Skip to content

Commit 6d593a5

Browse files
committed
exclude several KEY_ macros from ecodes.c
1 parent 3f36361 commit 6d593a5

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎evdev/ecodes.sh‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ header=${1:-/usr/include/linux/input.h}
99

1010

1111
function codes () {
12-
cat ${header} \
13-
| awk '/#define +(KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN)_/ \
14-
{print " PyModule_AddIntMacro(m, "$2");"}'
12+
awk '
13+
/#define +KEY_(MAX|CNT|MIN_INTERESTING_KEY_MUTE)/ {
14+
next
15+
}
16+
17+
/#define +(KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN)_/ {
18+
print " PyModule_AddIntMacro(m, "$2");"
19+
}' ${header}
1520
}
1621

1722
cat << EOF

0 commit comments

Comments
 (0)