Talk:Map scancodes to keycodes

From ArchWiki
Jump to navigation Jump to search

Systemd 221

Mauritiusdadd: thanks for updating this page to reflect the new Systemd 221 changes. I have a couple of questions: is there a version of udev which supports both new and old hwdb formats, or do I have to update my hwdb files at the same time as I upgrade systemd? Also, can you provide an external link which describes the situation in more detail? Just whereever you got your information from I guess... (P.S. wasn't sure if I should put this here or on your user or user talk page :/) Herodotus (talk) 18:36, 23 June 2015 (UTC)

Herodotus: As far as I know, there is no transitional version of udev which supports both hwdb formats. The new format has been introduced in systemd 220 without any notice except a vague commit message on the development branch [1]. I noticed the change only because when systemd 220 hit the [testing] repo, my custom keyboard mapping sopped to work and it took me a while to realize what happened... As regards the documentation I can not provide any external link because the only official documentation appears to be the comments in the file /usr/lib/udev/hwdb.d/60-keyboard.hwdb [2] -- Mauritiusdadd (talk) 06:35, 24 June 2015 (UTC)

Updating the Hardware Database Index

Why is it not enough to just touch /usr and reboot? This causes systemd to update the hwdb because of the ConditionNeedsUpdate=/etc.

I don't see a reason to rebuild the hwdb each time the system is booted.

Das j (talk) 13:50, 12 January 2017 (UTC)

Key mapping fields in /usr/lib/udev/hwdb.d/60-keyboard.hwdb

According to the file content, the mapping should be scancode-to-keysym instead of scancode-to-keycode. As KEYBOARD_KEY_<hex scan code>=<key code identifier> shows, here "key code identifier" is probably keysym. It also makes sense that udev maps those vendor-specific keys directcly to certain keysyms or actions rather than to a keycode, which is to be futher mapped to other keysyms.

—This unsigned comment is by WEREWOLFGHOST (talk) 10:39, 13 October 2019‎. Please sign your posts with ~~~~!

As the Map scancodes to keycodes#Using udev section explains, scancodes are mapped to keycode names which are listed in /usr/include/linux/input-event-codes.h. Note that this is different than keysyms. Also, mapping scancodes directly to keysyms or actions does not make sense. -- Lahwaacz (talk) 11:14, 13 October 2019 (UTC)