[Bug 1361338] [NEW] Custom keymap in hwdb not working

Malte Wetz 1361338 at bugs.launchpad.net
Mon Aug 25 19:33:05 UTC 2014


Public bug reported:

I have a small gaming keyboard (Ideozon Fang) which has a terrible
default keymapping that I want to fix. To do that, I need to change its
default keymapping. But only for that keyboard and no other. My system
is Ubuntu 14.04 (amd64).

As an example, I will change the key '3' which is by default mapped to
'Numpad 3' to 'PgDn'.

The old way that used to work (and still does in Debian 7.6) was this:

<----- snip ----->
root at debian~# /lib/udev/keymap -i /dev/input/event7
Press ESC to finish, or Control-C if this device is not your primary keyboard
scan code: 0x7005B   key code: kp3

root at debian~# cat /etc/udev/keymaps/ideazon-zboard
0x7005B         pagedown

root at debian~# /lib/udev/keymap /dev/input/event7 /etc/udev/keymaps/ideazon-zboard
Remapped scancode 0x7005b to 0x6d (prior: 0x51)

root at debian~# evtest /dev/input/event7
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
Input device name: "Ideazon Zboard USB Gaming Device"
[...]
Event: time 1408993871.777960, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
Event: time 1408993871.777971, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1
<----- snap ----->

However, this method does not work anymore in 14.04 (for instance, there
is no 'keymap' utility). Now, if I researched it correctly, we are
supposed to do this:

<----- snip ----->
root at ubuntu:~# lsusb | grep -i ideazon
Bus 003 Device 009: ID 1038:0310 Ideazon, Inc.

root at ubuntu:~# cat /etc/udev/hwdb.d/91-local-ideazon-zboard.hwdb
keyboard:usb:v1038p0310*
 KEYBOARD_KEY_07005b=pagedown

root at ubuntu:~# udevadm hwdb --update

root at ubuntu:~# evtest /dev/input/event6
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
Input device name: "Ideazon Zboard USB Gaming Device"
[...]
Event: time 1408993986.205654, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
Event: time 1408993986.205654, type 1 (EV_KEY), code 81 (KEY_KP3), value 1
<----- snap ----->

But, as you can see, it does not work. 'evtest' still reports the key as
'Numpad 3'. Even unplugging and re-plugging the keyboard has no effect.
'udevadm' seems to compile my custom file alright (it complains if I
purposefully put a syntax error in it). But I still cannot redefine my
keymap.

I do not know if this is a problem of the newer udev itself. But even if
it is, Ubuntu should not use it until it actually works. Especially not
in a LTS version.

** Affects: udev (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  I have a small gaming keyboard (Ideozon Fang) which has a terrible
  default keymapping that I want to fix. To do that, I need to change its
  default keymapping. But only for that keyboard and no other.
  
  As an example, I will change the key '3' which is by default mapped to
  'Numpad 3' to 'PgDn'.
  
  The old way that used to work (and still does in Debian 7.6) was this:
  
  <----- snip ----->
- root at debian~# /lib/udev/keymap -i /dev/input/event7 
+ root at debian~# /lib/udev/keymap -i /dev/input/event7
  Press ESC to finish, or Control-C if this device is not your primary keyboard
  scan code: 0x7005B   key code: kp3
  
- root at debian~# cat /etc/udev/keymaps/ideazon-zboard 
+ root at debian~# cat /etc/udev/keymaps/ideazon-zboard
  0x7005B         pagedown
  
- root at debian~# /lib/udev/keymap /dev/input/event7 /etc/udev/keymaps/ideazon-zboard 
+ root at debian~# /lib/udev/keymap /dev/input/event7 /etc/udev/keymaps/ideazon-zboard
  Remapped scancode 0x7005b to 0x6d (prior: 0x51)
  
  root at debian~# evtest /dev/input/event7
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993871.777960, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993871.777971, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1
  <----- snap ----->
  
- 
- However, this method does not work anymore in 14.04 (for instance, there is no 'keymap' utility). Now, if I researched it correctly, we are supposed to do this:
+ However, this method does not work anymore in 14.04 (for instance, there
+ is no 'keymap' utility). Now, if I researched it correctly, we are
+ supposed to do this:
  
  <----- snip ----->
  root at ubuntu:~# lsusb | grep -i ideazon
- Bus 003 Device 009: ID 1038:0310 Ideazon, Inc. 
+ Bus 003 Device 009: ID 1038:0310 Ideazon, Inc.
  
- root at ubuntu:~# cat /etc/udev/hwdb.d/91-local-ideazon-zboard.hwdb 
+ root at ubuntu:~# cat /etc/udev/hwdb.d/91-local-ideazon-zboard.hwdb
  keyboard:usb:v1038p0310*
-  KEYBOARD_KEY_07005b=pagedown
+  KEYBOARD_KEY_07005b=pagedown
  
  root at ubuntu:~# udevadm hwdb --update
  
  root at ubuntu:~# evtest /dev/input/event6
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
- [...] 
+ [...]
  Event: time 1408993986.205654, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993986.205654, type 1 (EV_KEY), code 81 (KEY_KP3), value 1
  <----- snap ----->
  
  But, as you can see, it does not work. 'evtest' still reports the key as
  'Numpad 3'. Even unplugging and re-pluggin the keyboard has no effect.
- 'udevadm' seems to compile my custom file alright (if complains if I
+ 'udevadm' seems to compile my custom file alright (it complains if I
  purposefully put a syntax error in it). But I still cannot redefine my
  keymap.
  
  I do not know if this is a problem of the newer udev itself. But even if
  it is, Ubuntu should not use it until it actually works. Especially not
  in a LTS version.

** Description changed:

  I have a small gaming keyboard (Ideozon Fang) which has a terrible
  default keymapping that I want to fix. To do that, I need to change its
- default keymapping. But only for that keyboard and no other.
+ default keymapping. But only for that keyboard and no other. My system
+ is Ubuntu 14.04 (amd64).
  
  As an example, I will change the key '3' which is by default mapped to
  'Numpad 3' to 'PgDn'.
  
  The old way that used to work (and still does in Debian 7.6) was this:
  
  <----- snip ----->
  root at debian~# /lib/udev/keymap -i /dev/input/event7
  Press ESC to finish, or Control-C if this device is not your primary keyboard
  scan code: 0x7005B   key code: kp3
  
  root at debian~# cat /etc/udev/keymaps/ideazon-zboard
  0x7005B         pagedown
  
  root at debian~# /lib/udev/keymap /dev/input/event7 /etc/udev/keymaps/ideazon-zboard
  Remapped scancode 0x7005b to 0x6d (prior: 0x51)
  
  root at debian~# evtest /dev/input/event7
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993871.777960, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993871.777971, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1
  <----- snap ----->
  
  However, this method does not work anymore in 14.04 (for instance, there
  is no 'keymap' utility). Now, if I researched it correctly, we are
  supposed to do this:
  
  <----- snip ----->
  root at ubuntu:~# lsusb | grep -i ideazon
  Bus 003 Device 009: ID 1038:0310 Ideazon, Inc.
  
  root at ubuntu:~# cat /etc/udev/hwdb.d/91-local-ideazon-zboard.hwdb
  keyboard:usb:v1038p0310*
   KEYBOARD_KEY_07005b=pagedown
  
  root at ubuntu:~# udevadm hwdb --update
  
  root at ubuntu:~# evtest /dev/input/event6
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993986.205654, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993986.205654, type 1 (EV_KEY), code 81 (KEY_KP3), value 1
  <----- snap ----->
  
  But, as you can see, it does not work. 'evtest' still reports the key as
  'Numpad 3'. Even unplugging and re-pluggin the keyboard has no effect.
  'udevadm' seems to compile my custom file alright (it complains if I
  purposefully put a syntax error in it). But I still cannot redefine my
  keymap.
  
  I do not know if this is a problem of the newer udev itself. But even if
  it is, Ubuntu should not use it until it actually works. Especially not
  in a LTS version.

** Description changed:

  I have a small gaming keyboard (Ideozon Fang) which has a terrible
  default keymapping that I want to fix. To do that, I need to change its
  default keymapping. But only for that keyboard and no other. My system
  is Ubuntu 14.04 (amd64).
  
  As an example, I will change the key '3' which is by default mapped to
  'Numpad 3' to 'PgDn'.
  
  The old way that used to work (and still does in Debian 7.6) was this:
  
  <----- snip ----->
  root at debian~# /lib/udev/keymap -i /dev/input/event7
  Press ESC to finish, or Control-C if this device is not your primary keyboard
  scan code: 0x7005B   key code: kp3
  
  root at debian~# cat /etc/udev/keymaps/ideazon-zboard
  0x7005B         pagedown
  
  root at debian~# /lib/udev/keymap /dev/input/event7 /etc/udev/keymaps/ideazon-zboard
  Remapped scancode 0x7005b to 0x6d (prior: 0x51)
  
  root at debian~# evtest /dev/input/event7
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993871.777960, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993871.777971, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1
  <----- snap ----->
  
  However, this method does not work anymore in 14.04 (for instance, there
  is no 'keymap' utility). Now, if I researched it correctly, we are
  supposed to do this:
  
  <----- snip ----->
  root at ubuntu:~# lsusb | grep -i ideazon
  Bus 003 Device 009: ID 1038:0310 Ideazon, Inc.
  
  root at ubuntu:~# cat /etc/udev/hwdb.d/91-local-ideazon-zboard.hwdb
  keyboard:usb:v1038p0310*
   KEYBOARD_KEY_07005b=pagedown
  
  root at ubuntu:~# udevadm hwdb --update
  
  root at ubuntu:~# evtest /dev/input/event6
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993986.205654, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993986.205654, type 1 (EV_KEY), code 81 (KEY_KP3), value 1
  <----- snap ----->
  
  But, as you can see, it does not work. 'evtest' still reports the key as
- 'Numpad 3'. Even unplugging and re-pluggin the keyboard has no effect.
+ 'Numpad 3'. Even unplugging and re-plugging the keyboard has no effect.
  'udevadm' seems to compile my custom file alright (it complains if I
  purposefully put a syntax error in it). But I still cannot redefine my
  keymap.
  
  I do not know if this is a problem of the newer udev itself. But even if
  it is, Ubuntu should not use it until it actually works. Especially not
  in a LTS version.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to udev in Ubuntu.
https://bugs.launchpad.net/bugs/1361338

Title:
  Custom keymap in hwdb not working

Status in “udev” package in Ubuntu:
  New

Bug description:
  I have a small gaming keyboard (Ideozon Fang) which has a terrible
  default keymapping that I want to fix. To do that, I need to change
  its default keymapping. But only for that keyboard and no other. My
  system is Ubuntu 14.04 (amd64).

  As an example, I will change the key '3' which is by default mapped to
  'Numpad 3' to 'PgDn'.

  The old way that used to work (and still does in Debian 7.6) was this:

  <----- snip ----->
  root at debian~# /lib/udev/keymap -i /dev/input/event7
  Press ESC to finish, or Control-C if this device is not your primary keyboard
  scan code: 0x7005B   key code: kp3

  root at debian~# cat /etc/udev/keymaps/ideazon-zboard
  0x7005B         pagedown

  root at debian~# /lib/udev/keymap /dev/input/event7 /etc/udev/keymaps/ideazon-zboard
  Remapped scancode 0x7005b to 0x6d (prior: 0x51)

  root at debian~# evtest /dev/input/event7
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993871.777960, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993871.777971, type 1 (EV_KEY), code 109 (KEY_PAGEDOWN), value 1
  <----- snap ----->

  However, this method does not work anymore in 14.04 (for instance,
  there is no 'keymap' utility). Now, if I researched it correctly, we
  are supposed to do this:

  <----- snip ----->
  root at ubuntu:~# lsusb | grep -i ideazon
  Bus 003 Device 009: ID 1038:0310 Ideazon, Inc.

  root at ubuntu:~# cat /etc/udev/hwdb.d/91-local-ideazon-zboard.hwdb
  keyboard:usb:v1038p0310*
   KEYBOARD_KEY_07005b=pagedown

  root at ubuntu:~# udevadm hwdb --update

  root at ubuntu:~# evtest /dev/input/event6
  Input driver version is 1.0.1
  Input device ID: bus 0x3 vendor 0x1038 product 0x310 version 0x111
  Input device name: "Ideazon Zboard USB Gaming Device"
  [...]
  Event: time 1408993986.205654, type 4 (EV_MSC), code 4 (MSC_SCAN), value 7005b
  Event: time 1408993986.205654, type 1 (EV_KEY), code 81 (KEY_KP3), value 1
  <----- snap ----->

  But, as you can see, it does not work. 'evtest' still reports the key
  as 'Numpad 3'. Even unplugging and re-plugging the keyboard has no
  effect. 'udevadm' seems to compile my custom file alright (it
  complains if I purposefully put a syntax error in it). But I still
  cannot redefine my keymap.

  I do not know if this is a problem of the newer udev itself. But even
  if it is, Ubuntu should not use it until it actually works. Especially
  not in a LTS version.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/1361338/+subscriptions



More information about the foundations-bugs mailing list