[xkeyboard-config,2/2] evdev/int: Fix KEY_KEYBOARD mapping

Submitted by Hans de Goede on Dec. 21, 2018, 10:21 a.m.

Details

Message ID 20181221102116.22056-3-hdegoede@redhat.com
State New
Headers show
Series "2 evdev/inet mapping fixes" ( rev: 1 ) in X.org

Not browsing as part of any series.

Commit Message

Hans de Goede Dec. 21, 2018, 10:21 a.m.
KEY_KEYBOARD has an evdev-keycode value of 374 not 366. It seems that
with the original addition of the mapping the evdev-keycode value was
mistaken for the X scancode which is 8 higher then the evdev-keycode
since the X scancodes start at 8. What seems to have happened is that
the evdev-keycode was used instead of the X scancode and then 8 was
subtracted for the wrong "// #define KEY_KEYBOARD      366" comment.

This commit corrects the comment to say 374 and corrects the X
scancode being mapped to 382.

Cc: Christian Kellner <christian@kellner.me>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 keycodes/evdev | 2 +-
 symbols/inet   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/keycodes/evdev b/keycodes/evdev
index 90b8278..dd2b865 100644
--- a/keycodes/evdev
+++ b/keycodes/evdev
@@ -285,7 +285,7 @@  default xkb_keycodes "evdev" {
 	<I255> = 255;	// #define KEY_RFKILL              247
 
 	<I372> = 372;   // #define KEY_FAVORITES           364
-	<I374> = 374;   // #define KEY_KEYBOARD            366
+	<I382> = 382;   // #define KEY_KEYBOARD            374
 
 	// Fake keycodes for virtual keys
 	<LVL3> =   92;
diff --git a/symbols/inet b/symbols/inet
index 5a8d180..7ff7c24 100644
--- a/symbols/inet
+++ b/symbols/inet
@@ -219,7 +219,7 @@  xkb_symbols "evdev" {
     key <I255>   {      [ XF86RFKill            ]       }; // KEY_RFKILL
 
     key <I372>  {       [ XF86Favorites          ]       };
-    key <I374>  {       [ XF86Keyboard           ]       };
+    key <I382>  {       [ XF86Keyboard           ]       };
 
     key <FK13>   {      [ XF86Tools         ]       };
     key <FK14>   {      [ XF86Launch5       ]       };

Comments

Hi Hans,

On Fri, 21 Dec, 2018 at 11:21 AM, Hans de Goede <hdegoede@redhat.com> 
wrote:
> KEY_KEYBOARD has an evdev-keycode value of 374 not 366. It seems that
> with the original addition of the mapping the evdev-keycode value was
> mistaken for the X scancode which is 8 higher then the evdev-keycode
> since the X scancodes start at 8. What seems to have happened is that
> the evdev-keycode was used instead of the X scancode and then 8 was
> subtracted for the wrong "// #define KEY_KEYBOARD      366" comment.
Ups. Sorry for that. Your explanation seems very plausible.

> This commit corrects the comment to say 374 and corrects the X
> scancode being mapped to 382.
"#define KEY_KEYBOARD	0x176" is 374 indeed, so looks good to me. Thanks!

Reviewed-by: Christian Kellner <christian@kellner.me>