summaryrefslogtreecommitdiff
path: root/src/udev/generate-keyboard-keys-list.sh
blob: ead311334231cdd0811c8dae02c5a3c11c194b35 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -eu
set -o pipefail

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