Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-07-2016, 01:07 PM   #1
LQ Newbie
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
Question Custom hwdb key mappings not working after Debian upgrade to stretch

I use custom hwdb files to remap parts of my keyboards (MS Ergonomic and Logitech G600 mouse). After upgrading from Jessie to Stretch none of the customizations work. I'm going to focus on the MS Ergonomic keyboard here in the hopes that whatever fixes this will also fix the mouse. The mouse has a much longer configuration.

I cannot use Xmodmap instead (the mappings don't persist in virtual environments).

My hwdb file: 71-MSErgonomic.hwdb
The system definitions for the same keyboard does load.
From /lib/udev/hwdb.d/60-keyboard.hwdb
# Microsoft Natural Ergonomic Keyboard 4000
I have tried rebuilding the hwdb
udevadm hwdb --update
udevadm control --reload
udevadm trigger
followed by unplugging/plugging the device, rebooting computer, etc. and my keycodes are never used. I have verified that /etc/udev/hwdb.bin changes when I do the rebuild.

Other udevadm info (showing the successful mapping from 60-keyboard.hwdb):
/sys #udevadm --debug test-builtin keyboard /devices/pci0000:00/0000:00:14.0/usb1/1-13/1-13:1.1/0003:045E:00DB.0011/input/input30/event1
calling: test-builtin
=== trie on-disk ===
tool version: 230
file size: 7177792 bytes
header size 80 bytes
strings 1790456 bytes
nodes 5387256 bytes
Load module index
Found container virtualization none
timestamp of '/etc/systemd/network' changed
timestamp of '/lib/systemd/network' changed
Parsed configuration file /lib/systemd/network/
Created link configuration context.
keyboard: mapping scan code 786989 (0xc022d) to key code 418 (0x1a2)
keyboard: mapping scan code 786990 (0xc022e) to key code 419 (0x1a3)
Unload module index
Unloaded link configuration context.

Last edited by pinyaka; 06-07-2016 at 02:43 PM. Reason: changed from quote to code tag to preserve indentation
Old 06-07-2016, 02:54 PM   #2
LQ Newbie
Registered: May 2016
Posts: 4

Original Poster
Rep: Reputation: Disabled
Okay, I fixed it myself.

The problem was wrong bus designation. Even though the 60-keyboard specifies bus 3 (and indeed /usr/include/linux/input.h specifies that usb devices should be on 0x03), the keyboard and mouse keyboard were actually on bus 1.

In 71-MSErgonomic.hwdb I changed
I did the same for my mouse's hwdb file. Afterwards, I ran the code above to rebuild, reload and trigger the hwdb and everything is working as expected. There is a current bug report for the documentation already submitted.


keybinding, scancode, udev

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH Key mappings on HPUX 11.x dazdaz Other *NIX 1 10-20-2012 01:04 PM
key mappings michaeljh2000 Slackware 11 12-25-2006 11:57 AM
Modifying key mappings pda_h4x0r Linux - Software 0 12-18-2006 02:47 AM
Error loading key mappings {!!} geletine Linux - Software 2 09-10-2006 08:22 AM
extra key mappings lechuck Linux - Newbie 6 11-04-2003 02:31 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration