All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] About pt-br keyboard layout
@ 2019-04-26  8:09 ` Lin Ma
  0 siblings, 0 replies; 7+ messages in thread
From: Lin Ma @ 2019-04-26  8:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: berrange, kraxel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] About pt-br keyboard layout
@ 2019-04-26  8:09 ` Lin Ma
  0 siblings, 0 replies; 7+ messages in thread
From: Lin Ma @ 2019-04-26  8:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] About pt-br keyboard layout
@ 2019-04-26  8:38   ` Gerd Hoffmann
  0 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2019-04-26  8:38 UTC (permalink / raw)
  To: Lin Ma; +Cc: qemu-devel, berrange

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] About pt-br keyboard layout
@ 2019-04-26  8:38   ` Gerd Hoffmann
  0 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2019-04-26  8:38 UTC (permalink / raw)
  To: Lin Ma; +Cc: qemu-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 1115 bytes --]

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] About pt-br keyboard layout
  2019-04-26  8:38   ` Gerd Hoffmann
  (?)
@ 2019-04-26 11:41   ` Lin Ma
  2019-04-26 11:48     ` Gerd Hoffmann
  -1 siblings, 1 reply; 7+ messages in thread
From: Lin Ma @ 2019-04-26 11:41 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel


On 4/26/19 4:38 PM, Gerd Hoffmann wrote:
> 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.
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?
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] About pt-br keyboard layout
  2019-04-26 11:41   ` Lin Ma
@ 2019-04-26 11:48     ` Gerd Hoffmann
  2019-04-26 12:52       ` Lin Ma
  0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2019-04-26 11:48 UTC (permalink / raw)
  To: Lin Ma; +Cc: qemu-devel

> > 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] About pt-br keyboard layout
  2019-04-26 11:48     ` Gerd Hoffmann
@ 2019-04-26 12:52       ` Lin Ma
  0 siblings, 0 replies; 7+ messages in thread
From: Lin Ma @ 2019-04-26 12:52 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel


On 4/26/19 7:48 PM, Gerd Hoffmann wrote:
>>> 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).
:-)  Thank you very much!
Lin

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-04-26 12:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-26  8:09 [Qemu-devel] About pt-br keyboard layout Lin Ma
2019-04-26  8:09 ` Lin Ma
2019-04-26  8:38 ` Gerd Hoffmann
2019-04-26  8:38   ` Gerd Hoffmann
2019-04-26 11:41   ` Lin Ma
2019-04-26 11:48     ` Gerd Hoffmann
2019-04-26 12:52       ` Lin Ma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.