Skip to content

Commit aa3b157

Browse files
committed
Search for constants in <linux/uinput.h> as well
A couple of important uinput constants are located in <linux/input.h>, so we need to scan that file in order to get them properly exposed.
1 parent 71dcbe0 commit aa3b157

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎evdev/genecodes.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
#-----------------------------------------------------------------------------
23-
macro_regex = r'#define +((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF)_\w+)'
23+
macro_regex = r'#define +((?:KEY|ABS|REL|SW|MSC|LED|BTN|REP|SND|ID|EV|BUS|SYN|FF|UI_FF)_\w+)'
2424
macro_regex = re.compile(macro_regex)
2525

2626
uname = list(os.uname()); del uname[1]
@@ -34,6 +34,7 @@
3434
#include <dev/evdev/input.h>
3535
#else
3636
#include <linux/input.h>
37+
#include <linux/uinput.h>
3738
#endif
3839
3940
/* Automatically generated by evdev.genecodes */

‎setup.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def create_ecodes(headers=None):
7070
headers = [
7171
'/usr/include/linux/input.h',
7272
'/usr/include/linux/input-event-codes.h',
73+
'/usr/include/linux/uinput.h',
7374
]
7475

7576
headers = [header for header in headers if os.path.isfile(header)]

0 commit comments

Comments
 (0)