LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 06-07-2016, 02:07 PM   #1
pinyaka
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
Code:
evdev:input:b003v045Ep00DB*
 KEYBOARD_KEY_70039=leftctrl
 KEYBOARD_KEY_700e0=capslock
The system definitions for the same keyboard does load.
From /lib/udev/hwdb.d/60-keyboard.hwdb
Code:
# Microsoft Natural Ergonomic Keyboard 4000
evdev:input:b0003v045Ep00DB*
 KEYBOARD_KEY_c022d=zoomin
 KEYBOARD_KEY_c022e=zoomout
I have tried rebuilding the hwdb
Code:
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):
Quote:
/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/99-default.link
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 03:43 PM. Reason: changed from quote to code tag to preserve indentation
 
Old 06-07-2016, 03:54 PM   #2
pinyaka
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
Quote:
evdev:input:b0003v045Ep00DB*
to
Quote:
evdev:input:b*v045Ep00DB*
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.
 
  


Reply

Tags
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 02:04 PM
key mappings michaeljh2000 Slackware 11 12-25-2006 12:57 PM
Modifying key mappings pda_h4x0r Linux - Software 0 12-18-2006 03:47 AM
Error loading key mappings {!!} geletine Linux - Software 2 09-10-2006 09:22 AM
extra key mappings lechuck Linux - Newbie 6 11-04-2003 03:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:39 AM.

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