summaryrefslogtreecommitdiff
path: root/src/udev/generate-keyboard-keys-list.sh
blob: aa00c15c1676d4820b343ea37e4cc368569a2645 (plain)
1
2
3
4
5
6
7
#!/bin/sh
set -eu

$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 }
'