mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
hwdb: weed out key defines which do not designate events
The defines KEY_MAX KEY_CNT KEY_MIN_INTERESTING BTN_MISC BTN_MOUSE BTN_JOYSTICK BTN_GAMEPAD BTN_DIGI BTN_WHEEL BTN_TRIGGER_HAPPY mark start/end of key blocks and do not designate events. Exclude them from the list of recognized key events.
This commit is contained in:
parent
22811ad065
commit
8e46eba454
@ -1,4 +1,6 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
$1 -dM -include linux/input.h - </dev/null | \
|
||||
awk '/^#define[ \t]+(KEY|BTN)_[^ ]+[ \t]+[0-9BK]/ { if ($2 != "KEY_MAX") { print $2 } }'
|
||||
$1 -dM -include linux/input.h - </dev/null | awk '
|
||||
/\<(KEY_(MAX|MIN_INTERESTING))|(BTN_(MISC|MOUSE|JOYSTICK|GAMEPAD|DIGI|WHEEL|TRIGGER_HAPPY))\>/ { next }
|
||||
/^#define[ \t]+(KEY|BTN)_[^ ]+[ \t]+[0-9BK]/ { print $2 }
|
||||
'
|
||||
|
Loading…
x
Reference in New Issue
Block a user