On Fri, Apr 26, 2019 at 04:09:12PM +0800, Lin Ma wrote: > 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