* [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes @ 2016-12-23 13:00 OGAWA Hirofumi 2016-12-23 20:58 ` Hervé Poussineau 2016-12-23 21:58 ` [Qemu-devel] [PATCH] " Eric Blake 0 siblings, 2 replies; 15+ messages in thread From: OGAWA Hirofumi @ 2016-12-23 13:00 UTC (permalink / raw) To: qemu-devel; +Cc: Hervé Poussineau, Gerd Hoffmann With "ps2: use QEMU qcodes instead of scancodes", key handling was changed to qcode base. But all scancodes are not converted to new one. This adds some missing qcodes what I found in using. Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> --- hw/input/ps2.c | 3 +++ qapi-schema.json | 3 ++- ui/input-keymap.c | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff -puN hw/input/ps2.c~fix-ps2-scancode hw/input/ps2.c --- qemu/hw/input/ps2.c~fix-ps2-scancode 2016-12-23 21:14:59.837729450 +0900 +++ qemu-hirofumi/hw/input/ps2.c 2016-12-23 21:14:59.840729469 +0900 @@ -394,6 +394,9 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_LESS] = 0x61, [Q_KEY_CODE_SYSRQ] = 0x7f, [Q_KEY_CODE_RO] = 0x51, + [Q_KEY_CODE_HIRAGANA] = 0x13, + [Q_KEY_CODE_HENKAN] = 0x64, + [Q_KEY_CODE_YEN] = 0x6a, [Q_KEY_CODE_KP_COMMA] = 0x6d, }; diff -puN qapi-schema.json~fix-ps2-scancode qapi-schema.json --- qemu/qapi-schema.json~fix-ps2-scancode 2016-12-23 21:14:59.838729456 +0900 +++ qemu-hirofumi/qapi-schema.json 2016-12-23 21:14:59.840729469 +0900 @@ -3642,7 +3642,8 @@ 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', + 'ro', 'hiragana', 'henkan', 'yen', 'kp_comma', 'kp_equals', 'power' ] } ## diff -puN ui/input-keymap.c~fix-ps2-scancode ui/input-keymap.c --- qemu/ui/input-keymap.c~fix-ps2-scancode 2016-12-23 21:14:59.839729463 +0900 +++ qemu-hirofumi/ui/input-keymap.c 2016-12-23 21:14:59.840729469 +0900 @@ -131,6 +131,9 @@ static const int qcode_to_number[] = { [Q_KEY_CODE_DELETE] = 0xd3, [Q_KEY_CODE_RO] = 0x73, + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, [Q_KEY_CODE_KP_COMMA] = 0x7e, [Q_KEY_CODE__MAX] = 0, _ -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes 2016-12-23 13:00 [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes OGAWA Hirofumi @ 2016-12-23 20:58 ` Hervé Poussineau 2016-12-23 22:49 ` OGAWA Hirofumi 2016-12-23 21:58 ` [Qemu-devel] [PATCH] " Eric Blake 1 sibling, 1 reply; 15+ messages in thread From: Hervé Poussineau @ 2016-12-23 20:58 UTC (permalink / raw) To: OGAWA Hirofumi, qemu-devel; +Cc: Gerd Hoffmann Le 23/12/2016 à 14:00, OGAWA Hirofumi a écrit : > > With "ps2: use QEMU qcodes instead of scancodes", key handling was > changed to qcode base. But all scancodes are not converted to new one. > > This adds some missing qcodes what I found in using. > > Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> > --- > > hw/input/ps2.c | 3 +++ > qapi-schema.json | 3 ++- > ui/input-keymap.c | 3 +++ > 3 files changed, 8 insertions(+), 1 deletion(-) > > diff -puN hw/input/ps2.c~fix-ps2-scancode hw/input/ps2.c > --- qemu/hw/input/ps2.c~fix-ps2-scancode 2016-12-23 21:14:59.837729450 +0900 > +++ qemu-hirofumi/hw/input/ps2.c 2016-12-23 21:14:59.840729469 +0900 > @@ -394,6 +394,9 @@ static const uint16_t qcode_to_keycode_s > [Q_KEY_CODE_LESS] = 0x61, > [Q_KEY_CODE_SYSRQ] = 0x7f, > [Q_KEY_CODE_RO] = 0x51, > + [Q_KEY_CODE_HIRAGANA] = 0x13, > + [Q_KEY_CODE_HENKAN] = 0x64, > + [Q_KEY_CODE_YEN] = 0x6a, > [Q_KEY_CODE_KP_COMMA] = 0x6d, > }; > > diff -puN qapi-schema.json~fix-ps2-scancode qapi-schema.json > --- qemu/qapi-schema.json~fix-ps2-scancode 2016-12-23 21:14:59.838729456 +0900 > +++ qemu-hirofumi/qapi-schema.json 2016-12-23 21:14:59.840729469 +0900 > @@ -3642,7 +3642,8 @@ > 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', > 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', > 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', > - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', > + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', > + 'ro', 'hiragana', 'henkan', 'yen', > 'kp_comma', 'kp_equals', 'power' ] } > > ## > diff -puN ui/input-keymap.c~fix-ps2-scancode ui/input-keymap.c > --- qemu/ui/input-keymap.c~fix-ps2-scancode 2016-12-23 21:14:59.839729463 +0900 > +++ qemu-hirofumi/ui/input-keymap.c 2016-12-23 21:14:59.840729469 +0900 > @@ -131,6 +131,9 @@ static const int qcode_to_number[] = { > [Q_KEY_CODE_DELETE] = 0xd3, > > [Q_KEY_CODE_RO] = 0x73, > + [Q_KEY_CODE_HIRAGANA] = 0x70, > + [Q_KEY_CODE_HENKAN] = 0x79, > + [Q_KEY_CODE_YEN] = 0x7d, > [Q_KEY_CODE_KP_COMMA] = 0x7e, > > [Q_KEY_CODE__MAX] = 0, Can you also add the keycodes for scancode set 1: + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, and scancode set 3: + [Q_KEY_CODE_HIRAGANA] = 0x87, + [Q_KEY_CODE_HENKAN] = 0x86, + [Q_KEY_CODE_YEN] = 0x51, Hervé ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes 2016-12-23 20:58 ` Hervé Poussineau @ 2016-12-23 22:49 ` OGAWA Hirofumi 2016-12-27 14:27 ` Hervé Poussineau 0 siblings, 1 reply; 15+ messages in thread From: OGAWA Hirofumi @ 2016-12-23 22:49 UTC (permalink / raw) To: Hervé Poussineau; +Cc: qemu-devel, Gerd Hoffmann Hi, Hervé Poussineau <hpoussin@reactos.org> writes: >> [Q_KEY_CODE_RO] = 0x73, >> + [Q_KEY_CODE_HIRAGANA] = 0x70, >> + [Q_KEY_CODE_HENKAN] = 0x79, >> + [Q_KEY_CODE_YEN] = 0x7d, >> [Q_KEY_CODE_KP_COMMA] = 0x7e, >> >> [Q_KEY_CODE__MAX] = 0, > > Can you also add the keycodes for scancode set 1: > + [Q_KEY_CODE_HIRAGANA] = 0x70, > + [Q_KEY_CODE_HENKAN] = 0x79, > + [Q_KEY_CODE_YEN] = 0x7d, Current linux can't use set1, so untested. > and scancode set 3: > + [Q_KEY_CODE_HIRAGANA] = 0x87, > + [Q_KEY_CODE_HENKAN] = 0x86, > + [Q_KEY_CODE_YEN] = 0x51, Boot with "i8042.direct=1", then set set3. # echo 3 > /sys/devices/platform/i8042/serio0/set # cat /sys/devices/platform/i8042/serio0/set 3 HENKAN, HIRAGANA seems to be working, but YEN is not working. I'm not sure if it is your patch, testing, or kernel problem. Can you point what is problem? # lsinput [...] /dev/input/event4 bustype : BUS_I8042 vendor : 0x1 product : 0x3 version : 43907 name : "AT Raw Set 3 keyboard" phys : "isa0060/serio0/input0" bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP # input-event /dev/input/event4 bustype : BUS_I8042 vendor : 0x1 product : 0x3 version : 43907 name : "AT Raw Set 3 keyboard" phys : "isa0060/serio0/input0" bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP waiting for events [... on qemu monitor "sendkey henkan" ...] 06:49:58.061932: EV_KEY KEY_HENKAN (0x5c) pressed 06:49:58.061932: EV_SYN code=0 value=0 06:49:58.149812: EV_MSC MSC_SCAN 134 06:49:58.149812: EV_KEY KEY_HENKAN (0x5c) released 06:49:58.149812: EV_SYN code=0 value=0 06:49:58.333876: EV_MSC MSC_SCAN 135 [... on qemu monitor "sendkey hiragana" ...] 06:49:58.333876: EV_KEY KEY_KATAKANAHIRAGANA (0x5d) pressed 06:49:58.333876: EV_SYN code=0 value=0 06:49:58.421889: EV_MSC MSC_SCAN 135 06:49:58.421889: EV_KEY KEY_KATAKANAHIRAGANA (0x5d) released 06:49:58.421889: EV_SYN code=0 value=0 06:49:58.893893: EV_MSC MSC_SCAN 81 [... on qemu monitor "sendkey yen" ...] 06:49:58.893893: EV_KEY KEY_VOLUMEDOWN (0x72) pressed 06:49:58.893893: EV_SYN code=0 value=0 06:49:58.973841: EV_MSC MSC_SCAN 81 06:49:58.973841: EV_KEY KEY_VOLUMEDOWN (0x72) released 06:49:58.973841: EV_SYN code=0 value=0 timeout, quitting -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes 2016-12-23 22:49 ` OGAWA Hirofumi @ 2016-12-27 14:27 ` Hervé Poussineau 2016-12-27 19:49 ` OGAWA Hirofumi 0 siblings, 1 reply; 15+ messages in thread From: Hervé Poussineau @ 2016-12-27 14:27 UTC (permalink / raw) To: OGAWA Hirofumi; +Cc: qemu-devel, Gerd Hoffmann Le 23/12/2016 à 23:49, OGAWA Hirofumi a écrit : > Hi, > > Hervé Poussineau <hpoussin@reactos.org> writes: > [from ui/input-keymap.c] >>> [Q_KEY_CODE_RO] = 0x73, >>> + [Q_KEY_CODE_HIRAGANA] = 0x70, >>> + [Q_KEY_CODE_HENKAN] = 0x79, >>> + [Q_KEY_CODE_YEN] = 0x7d, >>> [Q_KEY_CODE_KP_COMMA] = 0x7e, >>> >>> [Q_KEY_CODE__MAX] = 0, >> [from hw/input/ps2.c] >> Can you also add the keycodes for scancode set 1: >> + [Q_KEY_CODE_HIRAGANA] = 0x70, >> + [Q_KEY_CODE_HENKAN] = 0x79, >> + [Q_KEY_CODE_YEN] = 0x7d, > > Current linux can't use set1, so untested. Note that those are the same as those added in input-keymap.c > >> and scancode set 3: >> + [Q_KEY_CODE_HIRAGANA] = 0x87, >> + [Q_KEY_CODE_HENKAN] = 0x86, >> + [Q_KEY_CODE_YEN] = 0x51, > > Boot with "i8042.direct=1", then set set3. > > # echo 3 > /sys/devices/platform/i8042/serio0/set > # cat /sys/devices/platform/i8042/serio0/set > 3 > > HENKAN, HIRAGANA seems to be working, but YEN is not working. I'm not > sure if it is your patch, testing, or kernel problem. > > Can you point what is problem? > > # lsinput > > [...] > > /dev/input/event4 > bustype : BUS_I8042 > vendor : 0x1 > product : 0x3 > version : 43907 > name : "AT Raw Set 3 keyboard" > phys : "isa0060/serio0/input0" > bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP > > # input-event > /dev/input/event4 > bustype : BUS_I8042 > vendor : 0x1 > product : 0x3 > version : 43907 > name : "AT Raw Set 3 keyboard" > phys : "isa0060/serio0/input0" > bits ev : EV_SYN EV_KEY EV_MSC EV_LED EV_REP > > waiting for events > [... on qemu monitor "sendkey henkan" ...] > 06:49:58.061932: EV_KEY KEY_HENKAN (0x5c) pressed > 06:49:58.061932: EV_SYN code=0 value=0 > 06:49:58.149812: EV_MSC MSC_SCAN 134 -> 134 = 0x86, as expected ([Q_KEY_CODE_HENKAN] = 0x86) > 06:49:58.149812: EV_KEY KEY_HENKAN (0x5c) released > 06:49:58.149812: EV_SYN code=0 value=0 > [... on qemu monitor "sendkey hiragana" ...] > 06:49:58.333876: EV_MSC MSC_SCAN 135 -> 135 = 0x87, as expected ([Q_KEY_CODE_HIRAGANA] = 0x87) > 06:49:58.333876: EV_KEY KEY_KATAKANAHIRAGANA (0x5d) pressed > 06:49:58.333876: EV_SYN code=0 value=0 > 06:49:58.421889: EV_MSC MSC_SCAN 135 > 06:49:58.421889: EV_KEY KEY_KATAKANAHIRAGANA (0x5d) released > 06:49:58.421889: EV_SYN code=0 value=0 > [... on qemu monitor "sendkey yen" ...] > 06:49:58.893893: EV_MSC MSC_SCAN 81 -> 81 = 0x51 > 06:49:58.893893: EV_KEY KEY_VOLUMEDOWN (0x72) pressed > 06:49:58.893893: EV_SYN code=0 value=0 > 06:49:58.973841: EV_MSC MSC_SCAN 81 > 06:49:58.973841: EV_KEY KEY_VOLUMEDOWN (0x72) released > 06:49:58.973841: EV_SYN code=0 value=0 > timeout, quitting So, Linux is describing 0x51 make scancode as VOLUMEDOWN. Indeed, according to http://www.quadibloc.com/comp/scan.htm Set 1 Set 2 Set 3 HENKAN 79 64 86 (kanji) HIRAGANA 70 13 87 (katakana) YEN 7d 6a 5d (INT 4) So correct values for hw/input/ps2.c seem to be: Set 1 (same values as in ui/input-keymap.c) + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, Set 2 (your initial patch) + [Q_KEY_CODE_HIRAGANA] = 0x13, + [Q_KEY_CODE_HENKAN] = 0x64, + [Q_KEY_CODE_YEN] = 0x6a, Set 3: + [Q_KEY_CODE_HIRAGANA] = 0x87, // already verified + [Q_KEY_CODE_HENKAN] = 0x86, // already verified + [Q_KEY_CODE_YEN] = 0x5d, // not 0x51, as I said in a previous email Can you check those values? Regards, Hervé ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes 2016-12-27 14:27 ` Hervé Poussineau @ 2016-12-27 19:49 ` OGAWA Hirofumi 2016-12-27 19:55 ` [Qemu-devel] [PATCH v3] " OGAWA Hirofumi 0 siblings, 1 reply; 15+ messages in thread From: OGAWA Hirofumi @ 2016-12-27 19:49 UTC (permalink / raw) To: Hervé Poussineau; +Cc: qemu-devel, Gerd Hoffmann Hervé Poussineau <hpoussin@reactos.org> writes: > [from hw/input/ps2.c] >>> Can you also add the keycodes for scancode set 1: >>> + [Q_KEY_CODE_HIRAGANA] = 0x70, >>> + [Q_KEY_CODE_HENKAN] = 0x79, >>> + [Q_KEY_CODE_YEN] = 0x7d, >> >> Current linux can't use set1, so untested. > > Note that those are the same as those added in input-keymap.c I see. >> [... on qemu monitor "sendkey yen" ...] >> 06:49:58.893893: EV_MSC MSC_SCAN 81 > -> 81 = 0x51 >> 06:49:58.893893: EV_KEY KEY_VOLUMEDOWN (0x72) pressed >> 06:49:58.893893: EV_SYN code=0 value=0 >> 06:49:58.973841: EV_MSC MSC_SCAN 81 >> 06:49:58.973841: EV_KEY KEY_VOLUMEDOWN (0x72) released >> 06:49:58.973841: EV_SYN code=0 value=0 >> timeout, quitting > > So, Linux is describing 0x51 make scancode as VOLUMEDOWN. > > Indeed, according to http://www.quadibloc.com/comp/scan.htm > Set 1 Set 2 Set 3 > HENKAN 79 64 86 (kanji) > HIRAGANA 70 13 87 (katakana) > YEN 7d 6a 5d (INT 4) > > So correct values for hw/input/ps2.c seem to be: [...] > Set 3: > + [Q_KEY_CODE_HIRAGANA] = 0x87, // already verified > + [Q_KEY_CODE_HENKAN] = 0x86, // already verified > + [Q_KEY_CODE_YEN] = 0x5d, // not 0x51, as I said in a previous email > > Can you check those values? 04:32:33.111316: EV_MSC MSC_SCAN 93 04:32:33.111316: EV_KEY KEY_BACKSLASH (0x2b) pressed 04:32:33.111316: EV_SYN code=0 value=0 Sent 93==0x5d as expected, but keycode is BACKSLASH. Of course, linux driver is using BACKSLASH(43) keycode for 0x5d. But linux driver has several BACKSLASH entries for multiple scancodes in set3. And qemu doesn't have 0x5d entry in set3. Also http://hp.vector.co.jp/authors/VA003720/lpproj/others/kbdjpn.htm yet another site says 0x5d. Some sites says about buggy keyboards using wrong scancode in set3, and microsoft seems to removed set3 from specification. So linux translation table for 43=>0x5d, maybe result of workarounds. So looks like 0x5d is right value for set3. Thanks. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2016-12-27 19:49 ` OGAWA Hirofumi @ 2016-12-27 19:55 ` OGAWA Hirofumi 2016-12-27 20:11 ` Hervé Poussineau 2017-01-04 8:50 ` Gerd Hoffmann 0 siblings, 2 replies; 15+ messages in thread From: OGAWA Hirofumi @ 2016-12-27 19:55 UTC (permalink / raw) To: Hervé Poussineau; +Cc: qemu-devel, Gerd Hoffmann, Eric Blake With "ps2: use QEMU qcodes instead of scancodes", key handling was changed to qcode base. But all scancodes are not converted to new one. This adds some missing qcodes/scancodes what I found in using. [set1 and set3 are from <hpoussin@reactos.org>] Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> --- hw/input/ps2.c | 10 ++++++++++ qapi-schema.json | 6 +++++- ui/input-keymap.c | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff -puN hw/input/ps2.c~fix-ps2-scancode hw/input/ps2.c --- qemu/hw/input/ps2.c~fix-ps2-scancode 2016-12-23 23:51:44.324955949 +0900 +++ qemu-hirofumi/hw/input/ps2.c 2016-12-28 04:50:05.075057779 +0900 @@ -252,6 +252,9 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_ASTERISK] = 0x37, [Q_KEY_CODE_LESS] = 0x56, [Q_KEY_CODE_RO] = 0x73, + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, [Q_KEY_CODE_KP_COMMA] = 0x7e, }; @@ -394,6 +397,9 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_LESS] = 0x61, [Q_KEY_CODE_SYSRQ] = 0x7f, [Q_KEY_CODE_RO] = 0x51, + [Q_KEY_CODE_HIRAGANA] = 0x13, + [Q_KEY_CODE_HENKAN] = 0x64, + [Q_KEY_CODE_YEN] = 0x6a, [Q_KEY_CODE_KP_COMMA] = 0x6d, }; @@ -504,6 +510,10 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_COMMA] = 0x41, [Q_KEY_CODE_DOT] = 0x49, [Q_KEY_CODE_SLASH] = 0x4a, + + [Q_KEY_CODE_HIRAGANA] = 0x87, + [Q_KEY_CODE_HENKAN] = 0x86, + [Q_KEY_CODE_YEN] = 0x5d, }; static uint8_t translate_table[256] = { diff -puN qapi-schema.json~fix-ps2-scancode qapi-schema.json --- qemu/qapi-schema.json~fix-ps2-scancode 2016-12-23 23:51:44.324955949 +0900 +++ qemu-hirofumi/qapi-schema.json 2016-12-24 08:32:46.658549598 +0900 @@ -3618,6 +3618,9 @@ # @kp_comma: since 2.4 # @kp_equals: since 2.6 # @power: since 2.6 +# @hiragana: since 2.9 +# @henkan: since 2.9 +# @yen: since 2.9 # # An enumeration of key name. # @@ -3642,7 +3645,8 @@ 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', + 'ro', 'hiragana', 'henkan', 'yen', 'kp_comma', 'kp_equals', 'power' ] } ## diff -puN ui/input-keymap.c~fix-ps2-scancode ui/input-keymap.c --- qemu/ui/input-keymap.c~fix-ps2-scancode 2016-12-23 23:51:44.325955954 +0900 +++ qemu-hirofumi/ui/input-keymap.c 2016-12-23 23:51:44.327955966 +0900 @@ -131,6 +131,9 @@ static const int qcode_to_number[] = { [Q_KEY_CODE_DELETE] = 0xd3, [Q_KEY_CODE_RO] = 0x73, + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, [Q_KEY_CODE_KP_COMMA] = 0x7e, [Q_KEY_CODE__MAX] = 0, _ -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2016-12-27 19:55 ` [Qemu-devel] [PATCH v3] " OGAWA Hirofumi @ 2016-12-27 20:11 ` Hervé Poussineau 2017-01-04 8:50 ` Gerd Hoffmann 1 sibling, 0 replies; 15+ messages in thread From: Hervé Poussineau @ 2016-12-27 20:11 UTC (permalink / raw) To: OGAWA Hirofumi; +Cc: qemu-devel, Gerd Hoffmann, Eric Blake Le 27/12/2016 à 20:55, OGAWA Hirofumi a écrit : > > With "ps2: use QEMU qcodes instead of scancodes", key handling was > changed to qcode base. But all scancodes are not converted to new one. > > This adds some missing qcodes/scancodes what I found in using. > > [set1 and set3 are from <hpoussin@reactos.org>] > Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2016-12-27 19:55 ` [Qemu-devel] [PATCH v3] " OGAWA Hirofumi 2016-12-27 20:11 ` Hervé Poussineau @ 2017-01-04 8:50 ` Gerd Hoffmann 2017-01-04 17:59 ` Hervé Poussineau 1 sibling, 1 reply; 15+ messages in thread From: Gerd Hoffmann @ 2017-01-04 8:50 UTC (permalink / raw) To: OGAWA Hirofumi; +Cc: Hervé Poussineau, qemu-devel, Eric Blake On Mi, 2016-12-28 at 04:55 +0900, OGAWA Hirofumi wrote: > With "ps2: use QEMU qcodes instead of scancodes", key handling was > changed to qcode base. But all scancodes are not converted to new one. > > This adds some missing qcodes/scancodes what I found in using. Added to ui queue. thanks, Gerd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2017-01-04 8:50 ` Gerd Hoffmann @ 2017-01-04 17:59 ` Hervé Poussineau 2017-01-04 21:11 ` OGAWA Hirofumi 0 siblings, 1 reply; 15+ messages in thread From: Hervé Poussineau @ 2017-01-04 17:59 UTC (permalink / raw) To: Gerd Hoffmann, OGAWA Hirofumi; +Cc: qemu-devel, Eric Blake Le 04/01/2017 à 09:50, Gerd Hoffmann a écrit : > On Mi, 2016-12-28 at 04:55 +0900, OGAWA Hirofumi wrote: >> With "ps2: use QEMU qcodes instead of scancodes", key handling was >> changed to qcode base. But all scancodes are not converted to new one. >> >> This adds some missing qcodes/scancodes what I found in using. > > Added to ui queue. Hi Gerd, Your pull request (patch 01/11) contains v2 of this patch (which is incomplete). I've only reviewed v3, which is complete. Regards, Hervé ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2017-01-04 17:59 ` Hervé Poussineau @ 2017-01-04 21:11 ` OGAWA Hirofumi 2017-01-05 8:12 ` Gerd Hoffmann 0 siblings, 1 reply; 15+ messages in thread From: OGAWA Hirofumi @ 2017-01-04 21:11 UTC (permalink / raw) To: Hervé Poussineau; +Cc: Gerd Hoffmann, qemu-devel, Eric Blake Hervé Poussineau <hpoussin@reactos.org> writes: > Le 04/01/2017 à 09:50, Gerd Hoffmann a écrit : >> On Mi, 2016-12-28 at 04:55 +0900, OGAWA Hirofumi wrote: >>> With "ps2: use QEMU qcodes instead of scancodes", key handling was >>> changed to qcode base. But all scancodes are not converted to new one. >>> >>> This adds some missing qcodes/scancodes what I found in using. >> >> Added to ui queue. > > Hi Gerd, > > Your pull request (patch 01/11) contains v2 of this patch (which is incomplete). > I've only reviewed v3, which is complete. Yes, please use v3. Here is copy&paste, FWIW. ---- Subject: [PATCH v3] ps2: Fix lost scancodes by recent changes With "ps2: use QEMU qcodes instead of scancodes", key handling was changed to qcode base. But all scancodes are not converted to new one. This adds some missing qcodes/scancodes what I found in using. [set1 and set3 are from Hervé Poussineau <hpoussin@reactos.org>] Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> --- hw/input/ps2.c | 10 ++++++++++ qapi-schema.json | 6 +++++- ui/input-keymap.c | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff -puN hw/input/ps2.c~fix-ps2-scancode hw/input/ps2.c --- qemu/hw/input/ps2.c~fix-ps2-scancode 2016-12-23 23:51:44.324955949 +0900 +++ qemu-hirofumi/hw/input/ps2.c 2016-12-28 04:50:05.075057779 +0900 @@ -252,6 +252,9 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_ASTERISK] = 0x37, [Q_KEY_CODE_LESS] = 0x56, [Q_KEY_CODE_RO] = 0x73, + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, [Q_KEY_CODE_KP_COMMA] = 0x7e, }; @@ -394,6 +397,9 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_LESS] = 0x61, [Q_KEY_CODE_SYSRQ] = 0x7f, [Q_KEY_CODE_RO] = 0x51, + [Q_KEY_CODE_HIRAGANA] = 0x13, + [Q_KEY_CODE_HENKAN] = 0x64, + [Q_KEY_CODE_YEN] = 0x6a, [Q_KEY_CODE_KP_COMMA] = 0x6d, }; @@ -504,6 +510,10 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_COMMA] = 0x41, [Q_KEY_CODE_DOT] = 0x49, [Q_KEY_CODE_SLASH] = 0x4a, + + [Q_KEY_CODE_HIRAGANA] = 0x87, + [Q_KEY_CODE_HENKAN] = 0x86, + [Q_KEY_CODE_YEN] = 0x5d, }; static uint8_t translate_table[256] = { diff -puN qapi-schema.json~fix-ps2-scancode qapi-schema.json --- qemu/qapi-schema.json~fix-ps2-scancode 2016-12-23 23:51:44.324955949 +0900 +++ qemu-hirofumi/qapi-schema.json 2016-12-24 08:32:46.658549598 +0900 @@ -3618,6 +3618,9 @@ # @kp_comma: since 2.4 # @kp_equals: since 2.6 # @power: since 2.6 +# @hiragana: since 2.9 +# @henkan: since 2.9 +# @yen: since 2.9 # # An enumeration of key name. # @@ -3642,7 +3645,8 @@ 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', + 'ro', 'hiragana', 'henkan', 'yen', 'kp_comma', 'kp_equals', 'power' ] } ## diff -puN ui/input-keymap.c~fix-ps2-scancode ui/input-keymap.c --- qemu/ui/input-keymap.c~fix-ps2-scancode 2016-12-23 23:51:44.325955954 +0900 +++ qemu-hirofumi/ui/input-keymap.c 2016-12-23 23:51:44.327955966 +0900 @@ -131,6 +131,9 @@ static const int qcode_to_number[] = { [Q_KEY_CODE_DELETE] = 0xd3, [Q_KEY_CODE_RO] = 0x73, + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, [Q_KEY_CODE_KP_COMMA] = 0x7e, [Q_KEY_CODE__MAX] = 0, _ -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2017-01-04 21:11 ` OGAWA Hirofumi @ 2017-01-05 8:12 ` Gerd Hoffmann 2017-01-05 8:45 ` OGAWA Hirofumi 0 siblings, 1 reply; 15+ messages in thread From: Gerd Hoffmann @ 2017-01-05 8:12 UTC (permalink / raw) To: OGAWA Hirofumi; +Cc: Hervé Poussineau, qemu-devel, Eric Blake On Do, 2017-01-05 at 06:11 +0900, OGAWA Hirofumi wrote: > Hervé Poussineau <hpoussin@reactos.org> writes: > > > Le 04/01/2017 à 09:50, Gerd Hoffmann a écrit : > >> On Mi, 2016-12-28 at 04:55 +0900, OGAWA Hirofumi wrote: > >>> With "ps2: use QEMU qcodes instead of scancodes", key handling was > >>> changed to qcode base. But all scancodes are not converted to new one. > >>> > >>> This adds some missing qcodes/scancodes what I found in using. > >> > >> Added to ui queue. > > > > Hi Gerd, > > > > Your pull request (patch 01/11) contains v2 of this patch (which is incomplete). > > I've only reviewed v3, which is complete. > > Yes, please use v3. Here is copy&paste, FWIW. Please don't send new versions of patches as reply. That confuses various patch management tools, they are considered being part of the discussion then. This is how the reviewed-by tag ended up being attributed to the wrong patch version. Have a look at http://patchew.org/QEMU/ for example, the patches sent as reply don't show up there, so they are not tested automatically. thanks, Gerd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH v3] ps2: Fix lost scancodes by recent changes 2017-01-05 8:12 ` Gerd Hoffmann @ 2017-01-05 8:45 ` OGAWA Hirofumi 0 siblings, 0 replies; 15+ messages in thread From: OGAWA Hirofumi @ 2017-01-05 8:45 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: Hervé Poussineau, qemu-devel, Eric Blake Gerd Hoffmann <kraxel@redhat.com> writes: >> Yes, please use v3. Here is copy&paste, FWIW. > > Please don't send new versions of patches as reply. That confuses > various patch management tools, they are considered being part of the > discussion then. This is how the reviewed-by tag ended up being > attributed to the wrong patch version. > > Have a look at http://patchew.org/QEMU/ for example, the patches sent as > reply don't show up there, so they are not tested automatically. Hm, it is surprise to me. Ok, I will re-start on new thread for qemu-devel next time. BTW, url of your example didn't show even initial patch (if I didn't overlook). Looks like it is broken. Thanks. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes 2016-12-23 13:00 [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes OGAWA Hirofumi 2016-12-23 20:58 ` Hervé Poussineau @ 2016-12-23 21:58 ` Eric Blake 2016-12-23 23:33 ` OGAWA Hirofumi 1 sibling, 1 reply; 15+ messages in thread From: Eric Blake @ 2016-12-23 21:58 UTC (permalink / raw) To: OGAWA Hirofumi, qemu-devel; +Cc: Hervé Poussineau, Gerd Hoffmann [-- Attachment #1: Type: text/plain, Size: 1137 bytes --] On 12/23/2016 07:00 AM, OGAWA Hirofumi wrote: > > With "ps2: use QEMU qcodes instead of scancodes", key handling was > changed to qcode base. But all scancodes are not converted to new one. > > This adds some missing qcodes what I found in using. > > Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> > --- > > +++ qemu-hirofumi/qapi-schema.json 2016-12-23 21:14:59.840729469 +0900 > @@ -3642,7 +3642,8 @@ > 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', > 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', > 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', > - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', > + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', > + 'ro', 'hiragana', 'henkan', 'yen', > 'kp_comma', 'kp_equals', 'power' ] } Missing documentation (including a 'since 2.9' designation) for the new enum members. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 604 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes 2016-12-23 21:58 ` [Qemu-devel] [PATCH] " Eric Blake @ 2016-12-23 23:33 ` OGAWA Hirofumi 2016-12-23 23:36 ` [Qemu-devel] [PATCH v2] " OGAWA Hirofumi 0 siblings, 1 reply; 15+ messages in thread From: OGAWA Hirofumi @ 2016-12-23 23:33 UTC (permalink / raw) To: Eric Blake; +Cc: qemu-devel, Hervé Poussineau, Gerd Hoffmann Eric Blake <eblake@redhat.com> writes: > On 12/23/2016 07:00 AM, OGAWA Hirofumi wrote: >> >> With "ps2: use QEMU qcodes instead of scancodes", key handling was >> changed to qcode base. But all scancodes are not converted to new one. >> >> This adds some missing qcodes what I found in using. >> >> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> >> --- >> > >> +++ qemu-hirofumi/qapi-schema.json 2016-12-23 21:14:59.840729469 +0900 >> @@ -3642,7 +3642,8 @@ >> 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', >> 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', >> 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', >> - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', >> + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', >> + 'ro', 'hiragana', 'henkan', 'yen', >> 'kp_comma', 'kp_equals', 'power' ] } > > Missing documentation (including a 'since 2.9' designation) for the new > enum members. Thanks for pointing out. -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH v2] ps2: Fix lost scancodes by recent changes 2016-12-23 23:33 ` OGAWA Hirofumi @ 2016-12-23 23:36 ` OGAWA Hirofumi 0 siblings, 0 replies; 15+ messages in thread From: OGAWA Hirofumi @ 2016-12-23 23:36 UTC (permalink / raw) To: Eric Blake; +Cc: qemu-devel, Hervé Poussineau, Gerd Hoffmann With "ps2: use QEMU qcodes instead of scancodes", key handling was changed to qcode base. But all scancodes are not converted to new one. This adds some missing qcodes/scancodes what I found in using. [set1 and set2 are still missing, but I'm not sure what is right values yet.] Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> --- hw/input/ps2.c | 3 +++ qapi-schema.json | 6 +++++- ui/input-keymap.c | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff -puN hw/input/ps2.c~fix-ps2-scancode hw/input/ps2.c --- qemu/hw/input/ps2.c~fix-ps2-scancode 2016-12-23 23:51:44.324955949 +0900 +++ qemu-hirofumi/hw/input/ps2.c 2016-12-24 08:30:12.426540795 +0900 @@ -394,6 +394,9 @@ static const uint16_t qcode_to_keycode_s [Q_KEY_CODE_LESS] = 0x61, [Q_KEY_CODE_SYSRQ] = 0x7f, [Q_KEY_CODE_RO] = 0x51, + [Q_KEY_CODE_HIRAGANA] = 0x13, + [Q_KEY_CODE_HENKAN] = 0x64, + [Q_KEY_CODE_YEN] = 0x6a, [Q_KEY_CODE_KP_COMMA] = 0x6d, }; diff -puN qapi-schema.json~fix-ps2-scancode qapi-schema.json --- qemu/qapi-schema.json~fix-ps2-scancode 2016-12-23 23:51:44.324955949 +0900 +++ qemu-hirofumi/qapi-schema.json 2016-12-24 08:32:46.658549598 +0900 @@ -3618,6 +3618,9 @@ # @kp_comma: since 2.4 # @kp_equals: since 2.6 # @power: since 2.6 +# @hiragana: since 2.9 +# @henkan: since 2.9 +# @yen: since 2.9 # # An enumeration of key name. # @@ -3642,7 +3645,8 @@ 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', - 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', 'ro', + 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', + 'ro', 'hiragana', 'henkan', 'yen', 'kp_comma', 'kp_equals', 'power' ] } ## diff -puN ui/input-keymap.c~fix-ps2-scancode ui/input-keymap.c --- qemu/ui/input-keymap.c~fix-ps2-scancode 2016-12-23 23:51:44.325955954 +0900 +++ qemu-hirofumi/ui/input-keymap.c 2016-12-23 23:51:44.327955966 +0900 @@ -131,6 +131,9 @@ static const int qcode_to_number[] = { [Q_KEY_CODE_DELETE] = 0xd3, [Q_KEY_CODE_RO] = 0x73, + [Q_KEY_CODE_HIRAGANA] = 0x70, + [Q_KEY_CODE_HENKAN] = 0x79, + [Q_KEY_CODE_YEN] = 0x7d, [Q_KEY_CODE_KP_COMMA] = 0x7e, [Q_KEY_CODE__MAX] = 0, _ -- OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-01-05 8:45 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-23 13:00 [Qemu-devel] [PATCH] ps2: Fix lost scancodes by recent changes OGAWA Hirofumi 2016-12-23 20:58 ` Hervé Poussineau 2016-12-23 22:49 ` OGAWA Hirofumi 2016-12-27 14:27 ` Hervé Poussineau 2016-12-27 19:49 ` OGAWA Hirofumi 2016-12-27 19:55 ` [Qemu-devel] [PATCH v3] " OGAWA Hirofumi 2016-12-27 20:11 ` Hervé Poussineau 2017-01-04 8:50 ` Gerd Hoffmann 2017-01-04 17:59 ` Hervé Poussineau 2017-01-04 21:11 ` OGAWA Hirofumi 2017-01-05 8:12 ` Gerd Hoffmann 2017-01-05 8:45 ` OGAWA Hirofumi 2016-12-23 21:58 ` [Qemu-devel] [PATCH] " Eric Blake 2016-12-23 23:33 ` OGAWA Hirofumi 2016-12-23 23:36 ` [Qemu-devel] [PATCH v2] " OGAWA Hirofumi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).