From: Michal Suchanek Date: Thu, 15 Jun 2017 10:50:05 +0000 (+0200) Subject: hwdb: weed out key defines which do not designate events X-Git-Tag: v234~74^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e46eba454f32b1105d9b167d4824f3e9d2b12ff;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/src/udev/generate-keyboard-keys-list.sh b/src/udev/generate-keyboard-keys-list.sh index 83bf4a9..7a74e0d 100755 --- a/src/udev/generate-keyboard-keys-list.sh +++ b/src/udev/generate-keyboard-keys-list.sh @@ -1,4 +1,6 @@ #!/bin/sh -eu -$1 -dM -include linux/input.h - / { next } + /^#define[ \t]+(KEY|BTN)_[^ ]+[ \t]+[0-9BK]/ { print $2 } +'