mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
extras/keymap: fix hash table collisions
More than one key name was mapped to the same key, due to linux/input.h defining some aliases (in particular, KEY_HANGUEL, KEY_SCREENLOCK, KEY_MIN_INTERESTING). These caused hash table collisions. Changed the generation of the tables to ignore these aliases, and updated all keymaps to use the canonical name. This was detected by llvm-clang-analyzer. Thanks to Lennart Poettering for doing these checks and pointing this out! https://launchpad.net/bugs/426647
This commit is contained in:
parent
78715f65c9
commit
6983c0d0f2
@ -528,7 +528,7 @@ dist_udevkeymap_DATA = \
|
||||
extras/keymap/keymaps/zepto-znote
|
||||
|
||||
extras/keymap/keys.txt: /usr/include/linux/input.h
|
||||
$(AM_V_GEN)$(AWK) '/^#define.*KEY_/ { if ($$2 != "KEY_MAX" && $$2 != "KEY_CNT") { print $$2 } }' < $< > $@
|
||||
$(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[[:space:]]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< > $@
|
||||
|
||||
extras/keymap/keys-from-name.gperf: extras/keymap/keys.txt
|
||||
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
|
||||
|
@ -2,4 +2,4 @@
|
||||
0x68 up
|
||||
0x69 down
|
||||
0x6B fn
|
||||
0x6C screenlock # FIXME: lock tablet device/buttons
|
||||
0x6C coffee # FIXME: lock tablet device/buttons
|
||||
|
@ -23,5 +23,5 @@
|
||||
0x9B switchvideomode # Display Toggle button
|
||||
0xA2 playpause # Front panel play/pause
|
||||
0xA4 stopcd # Front panel stop
|
||||
0xD8 screenlock # FIXME: Tablet lock button
|
||||
0xD8 coffee # FIXME: Tablet lock button
|
||||
0xED media # MediaDirect button
|
||||
|
@ -1,6 +1,6 @@
|
||||
0x81 fn_esc
|
||||
0x89 battery # FnF8
|
||||
0x8A screenlock # FnF6
|
||||
0x8A coffee # FnF6
|
||||
0x8B camera
|
||||
0x8C media # music
|
||||
0x8E dvd
|
||||
|
@ -1,3 +1,3 @@
|
||||
0xF0 help
|
||||
0xF1 screenlock
|
||||
0xF1 coffee
|
||||
0xF3 search
|
||||
|
@ -1,6 +1,6 @@
|
||||
0x5D menu
|
||||
0x63 fn
|
||||
0x66 screenlock
|
||||
0x66 coffee
|
||||
0x67 cyclewindows # bezel circular arrow
|
||||
0x68 setup # bezel setup / menu
|
||||
0x6c direction # rotate screen
|
||||
|
@ -1,5 +1,5 @@
|
||||
0x6C f21 # rotate
|
||||
0x68 screenlock # screenlock
|
||||
0x68 coffee # screenlock
|
||||
0x6B esc # escape
|
||||
0x6D right # right on d-pad
|
||||
0x6E left # left on d-pad
|
||||
|
@ -1,5 +1,5 @@
|
||||
0x01 battery # Fn+F2
|
||||
0x02 screenlock # Fn+F3
|
||||
0x02 coffee # Fn+F3
|
||||
0x03 sleep # Fn+F4
|
||||
0x04 wlan # Fn+F5
|
||||
0x06 switchvideomode # Fn+F7
|
||||
|
@ -1,4 +1,4 @@
|
||||
0x1 screenlock # Fn+F2
|
||||
0x1 coffee # Fn+F2
|
||||
0x2 battery # Fn+F3
|
||||
0x3 sleep # Fn+F4
|
||||
0x4 wlan # Fn+F5
|
||||
|
@ -5,6 +5,6 @@
|
||||
0x9F f21 # FIXME: Touchpad off
|
||||
0xB9 nextsong
|
||||
0xD9 brightnessup
|
||||
0xEE screenlock
|
||||
0xEE coffee
|
||||
0xF4 previoussong
|
||||
0xF7 playpause
|
||||
|
Loading…
Reference in New Issue
Block a user