diff options
Diffstat (limited to 'marsond.c')
-rw-r--r-- | marsond.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -29,6 +29,12 @@ #define DEFAULT_USER "nobody" #define DEFAULT_GROUP "nobody" +/* uinput.h defines KEY_MAX for use with UI_SET_KEYBIT, but the + mouse buttons are included in the key constants, which makes + xinput think we're both a keyboard and a pointer. actual + keyboard keys stop before that. */ +#define LAST_KBD_KEY 255 + const char *self; int debugging = 0; /* -v */ @@ -309,7 +315,7 @@ int main(int argc, char **argv) { /* the other event types will never be sent by a keyboard. */ /* we want all possible keystrokes */ - for(i = 0; i < KEY_MAX; i++) { + for(i = 0; i <= LAST_KBD_KEY; i++) { if(ioctl(outfd, UI_SET_KEYBIT, i) >= 0) { /* we don't wanna be *that* verbose */ } else { @@ -421,4 +427,8 @@ event: type 0, code 0, value 0 Onlt the type 1 messages concern us, but we have to pass them all through. code 28 is KEY_ENTER, value is 1 for press, 0 for release. + +from uinput.h: +type 4 EV_MSC, code 4 MSC_SCAN. +type 0 EV_SYN, code 0 SYN_REPORT. */ |