About pt-br keyboard layout
Hi all,
While I launch qemu with vnc + pt-br keyboard layout on my pc, If I type shift + 6 in iPXE shell or grub shell via my usual 105-key keyboard, shift + 6 would be mapped to "(apostrophe), But IIUC the correct character should be ¨(diaeresis) in pt-br layout.
I'm wondering that is it the expected behavior? In other words, Does it make sense if I want to type multi-character characters(say Ç or ¨) without guest os's help?
About pt-br keyboard (ABNT2), please refer to:
http://www.cjdinfo.com.br/utilitario-tabela-caracteres
https://docs.microsoft.com/en-us/globalization/keyboards/kbdbr_2.html
Any feedback would be appreciated,
Lin
Quoted 10 lines · Lin Ma
Hi all,
While I launch qemu with vnc + pt-br keyboard layout on my pc, If I type shift + 6 in iPXE shell or grub shell via my usual 105-key keyboard, shift + 6 would be mapped to "(apostrophe), But IIUC the correct character should be ¨(diaeresis) in pt-br layout.
I'm wondering that is it the expected behavior? In other words, Does it make sense if I want to type multi-character characters(say Ç or ¨) without guest os's help?
No. -k is for translating keysyms back into the correct scancodes, because this is what the (virtual) keyboard passes to the guest. So -k must match the *hosts* keyboard layout.
Translating the scancodes into keysyms again is the job of the guest, so that requires the keymapping you want to use being active in the guest os. Typically that would be the same you have on the host, but that isn't required. The guest can work with -- for example -- us layout (like it is often the case in boot loaders). Behavior should be identical to physical hardware here.
HTH,
Gerd
Quoted 8 lines · Gerd Hoffmann
Quoted 7 lines · Lin Ma
Hi all,
While I launch qemu with vnc + pt-br keyboard layout on my pc, If I type shift + 6 in iPXE shell or grub shell via my usual 105-key keyboard, shift + 6 would be mapped to "(apostrophe), But IIUC the correct character should be ¨(diaeresis) in pt-br layout.
Quoted 6 lines
Quoted 3 lines
I'm wondering that is it the expected behavior? In other words, Does it make sense if I want to type multi-character characters(say Ç or ¨) without guest os's help?
No. -k is for translating keysyms back into the correct scancodes, because this is what the (virtual) keyboard passes to the guest. So -k must match the *hosts* keyboard layout.
So, that means, If I launch qemu with -k pt-br on a host, I need to ensure the keyboard layout must be pt-br as well onthathypervisorhost,Then when I connected to this vnc server(qemu) throughvncviewer on mylaptop(us keyboard layout), I type shift + 6, I can get¨(diaeresis) character, am I right?
Quoted 9 lines
Translating the scancodes into keysyms again is the job of the guest, so that requires the keymapping you want to use being active in the guest os. Typically that would be the same you have on the host, but that isn't required. The guest can work with -- for example -- us layout (like it is often the case in boot loaders). Behavior should be identical to physical hardware here.
HTH,
Gerd
Quoted 8 lines
Quoted 1 line
So -k must match the *hosts* keyboard layout.
So, that means, If I launch qemu with -k pt-br on a host, I need to ensure the keyboard layout
must be pt-br as well onthathypervisorhost,Then when I connected to this vnc server(qemu)
throughvncviewer on mylaptop(us keyboard layout), I type shift + 6, I can get¨(diaeresis)
character, am I right?
No. I've simplified a bit, assuming both vncviewer and qemu run on the host machine. -k $layout must match the keyboard layout of the machine running vncviewer. So, in your case it should be us (the laptops layout).
cheers,
Gerd
Quoted 8 lines · Gerd Hoffmann
Quoted 8 lines
Quoted 1 line
So -k must match the *hosts* keyboard layout.
So, that means, If I launch qemu with -k pt-br on a host, I need to ensure the keyboard layout
must be pt-br as well onthathypervisorhost,Then when I connected to this vnc server(qemu)
throughvncviewer on mylaptop(us keyboard layout), I type shift + 6, I can get¨(diaeresis)
character, am I right?
Quoted 4 lines
No. I've simplified a bit, assuming both vncviewer and qemu run on the host machine. -k $layout must match the keyboard layout of the machine running vncviewer. So, in your case it should be us (the laptops layout).
:-) Thank you very much!
Lin