Message ID | 5c07634a39eecae39a9f0ba7a8cc58d5.squirrel@nonada.if.usp.br |
---|---|
State | New |
Headers | show |
Hi, > 12:44:02.389552: EV_MSC MSC_SCAN 458887 <== Here, / was pressed > 12:44:02.389552: EV_KEY KEY_RO (0x59) pressed 'RO'. Hmm, not very descriptive. Any idea what this could stand for? > 12:44:04.253486: EV_MSC MSC_SCAN 458885 <== Here, . in the numpad was pressed > 12:44:04.253486: EV_KEY KEY_KPCOMMA (0x79) pressed Ok. Is there a key with ',' too in your numpad? cheers, Gerd
> static const uint8_t evdev_keycode_to_pc_keycode[61] = { > - 0, /* 97 EVDEV - RO ("Internet" Keyboards) */ > + 0x73, /* 97 EVDEV - /?<C2><B0> (ABNT2 Keyboards) */ That one looks good. > - 0, /* 129 EVDEV - I129 ("Internet" Keyboards) */ > + 0x34, /* 129 abnt2 KP-period */ That is the *other* dot key, outside keypad. Patches just sent via git-send-email, test results are welcome. thanks, Gerd
I've tested an unpatched QEMU 2.3.0 (x86_64) with "-k pt_br" option and the "/?°" key works perfectly. I have not tested the numpad ".", but I can inform that ABNT2 keyboard does have "." (dot) and "," (comma) as separate keys: comma (numlock on) combined with delete (numlock off). But I found another key that is not working: the "<," ("less than" "comma"). Right now I cannot give details about its scancode, nor make any further test. Em ter, 26 de mai de 2015 às 11:01, Gerd Hoffmann <kraxel@redhat.com> escreveu: > > static const uint8_t evdev_keycode_to_pc_keycode[61] = { > > - 0, /* 97 EVDEV - RO ("Internet" Keyboards) */ > > + 0x73, /* 97 EVDEV - /?<C2><B0> (ABNT2 Keyboards) */ > > That one looks good. > > > - 0, /* 129 EVDEV - I129 ("Internet" Keyboards) */ > > + 0x34, /* 129 abnt2 KP-period */ > > That is the *other* dot key, outside keypad. > > Patches just sent via git-send-email, test results are welcome. > > thanks, > Gerd > > >
Hello, >> 12:44:02.389552: EV_MSC MSC_SCAN 458887 <== Here, / was pressed >> 12:44:02.389552: EV_KEY KEY_RO (0x59) pressed > > 'RO'. Hmm, not very descriptive. Any idea what this could stand for? RO stands for Romaji, which is japanese with roman letters (transliteration). > >> 12:44:04.253486: EV_MSC MSC_SCAN 458885 <== Here, . in the numpad was >> pressed >> 12:44:04.253486: EV_KEY KEY_KPCOMMA (0x79) pressed > > Ok. Is there a key with ',' too in your numpad? Yes, there is a separated ',' in the numpad, and when I press it I get 17:48:47.878881: EV_MSC MSC_SCAN 458851 17:48:47.878881: EV_KEY KEY_KPDOT (0x53) pressed 17:48:47.878881: EV_SYN code=0 value=0 ^[[3~17:48:47.966876: EV_MSC MSC_SCAN 458851 17:48:47.966876: EV_KEY KEY_KPDOT (0x53) released 17:48:47.966876: EV_SYN code=0 value=0 Apparently the codes are exchanged in ABNT2 numpad. Thanks, Joao Luis.
Hello, > I've tested an unpatched QEMU 2.3.0 (x86_64) with "-k pt_br" option and > the > "/?°" key works perfectly. From the manpage of qemu: -k language Use keyboard layout language (for example "fr" for French). This option is only needed where it is not easy to get raw PC keycodes (e.g. on Macs, with some X11 servers or with a VNC display). You don't normally need to use it on PC/Linux or PC/Windows hosts. Do you think that using the -k option is the right solution to this problem? > > I have not tested the numpad ".", but I can inform that ABNT2 keyboard > does > have "." (dot) and "," (comma) as separate keys: comma (numlock on) > combined with delete (numlock off). > > But I found another key that is not working: the "<," ("less than" > "comma"). Right now I cannot give details about its scancode, nor make any > further test. > > > Em ter, 26 de mai de 2015 às 11:01, Gerd Hoffmann <kraxel@redhat.com> > escreveu: > >> > static const uint8_t evdev_keycode_to_pc_keycode[61] = { >> > - 0, /* 97 EVDEV - RO ("Internet" Keyboards) */ >> > + 0x73, /* 97 EVDEV - /?<C2><B0> (ABNT2 Keyboards) */ >> >> That one looks good. >> >> > - 0, /* 129 EVDEV - I129 ("Internet" Keyboards) */ >> > + 0x34, /* 129 abnt2 KP-period */ >> >> That is the *other* dot key, outside keypad. >> >> Patches just sent via git-send-email, test results are welcome. >> >> thanks, >> Gerd >> >> >> >
Hi, > >> 12:44:04.253486: EV_MSC MSC_SCAN 458885 <== Here, . in the numpad was > >> pressed > >> 12:44:04.253486: EV_KEY KEY_KPCOMMA (0x79) pressed > > > > Ok. Is there a key with ',' too in your numpad? > > Yes, there is a separated ',' in the numpad, and when I press it I get > > 17:48:47.878881: EV_MSC MSC_SCAN 458851 > 17:48:47.878881: EV_KEY KEY_KPDOT (0x53) pressed > 17:48:47.878881: EV_SYN code=0 value=0 > ^[[3~17:48:47.966876: EV_MSC MSC_SCAN 458851 > 17:48:47.966876: EV_KEY KEY_KPDOT (0x53) released > 17:48:47.966876: EV_SYN code=0 value=0 > > Apparently the codes are exchanged in ABNT2 numpad. No, abnt2 has an additional numpad key. Most keyboards have only one, which is KPDOT. In US kbd layout this actually maps to a dot. On other layouts (german for example) it maps to comma. Probably because different countries use different chars as decimal separator. abnt2 is unique here, it has both comma and dot. cheers, Gerd
On Di, 2015-05-26 at 18:24 -0300, Joao Luis Meloni Assirati wrote: > Hello, > > > I've tested an unpatched QEMU 2.3.0 (x86_64) with "-k pt_br" option and > > the > > "/?°" key works perfectly. > > From the manpage of qemu: > > -k language > Use keyboard layout language (for example "fr" for French). This option > is only needed where it is not easy to get raw PC keycodes (e.g. on > Macs, with some X11 servers or with a VNC display). You don't normally > need to use it on PC/Linux or PC/Windows hosts. > > Do you think that using the -k option is the right solution to this problem? General rule for -k: If your keyboard layout is messed up try using -k, otherwise don't bother. When you use vnc -k might be needed, but whenever that is actually the case depends on the vnc client. There is a vnc extension to send raw keycodes, if the vnc client supports that this gives best results, if it doesn't you probably need -k for any non-us keyboard layout. The usual virt-related clients (virt-manager, virt-viewer, remote-viewer) support that vnc extension. cheers, Gerd
--- ui/x_keymap.c~ +++ ui/x_keymap.c @@ -94,7 +94,7 @@ */ static const uint8_t evdev_keycode_to_pc_keycode[61] = { - 0, /* 97 EVDEV - RO ("Internet" Keyboards) */ + 0x73, /* 97 EVDEV - /?<C2><B0> (ABNT2 Keyboards) */ 0, /* 98 EVDEV - KATA (Katakana) */ 0, /* 99 EVDEV - HIRA (Hiragana) */ 0x79, /* 100 EVDEV - HENK (Henkan) */ @@ -126,7 +126,7 @@ 0, /* 126 EVDEV - I126 ("Internet" Keyboards) */ 0, /* 127 EVDEV - PAUS */ 0, /* 128 EVDEV - ???? */ - 0, /* 129 EVDEV - I129 ("Internet" Keyboards) */ + 0x34, /* 129 abnt2 KP-period */ 0xf1, /* 130 EVDEV - HNGL (Korean Hangul Latin toggle) */ 0xf2, /* 131 EVDEV - HJCV (Korean Hangul Hanja toggle) */ 0x7d, /* 132 AE13 (Yen)*/