input: add user space include file
authorAlan Cox <alan@linux.intel.com>
Fri, 6 Jul 2018 21:19:01 +0000 (22:19 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 6 Jul 2018 21:19:01 +0000 (22:19 +0100)
Library/include/sys/input.h [new file with mode: 0644]

diff --git a/Library/include/sys/input.h b/Library/include/sys/input.h
new file mode 100644 (file)
index 0000000..b7f1f63
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef _SYS_INPUT_H
+#define _SYS_INPUT_H
+
+/* Low four bits indicate device number usually */
+
+#define MOUSE_REL      0x00            /* 8bit deltas - may need 16 ? */
+#define MOUSE_ABS      0x10            /* 16bit x 16bit virtual coords */
+#define STICK_DIGITAL  0x20            /* UDLR + buttons byte */
+#define        STICK_DIGITAL_U 0x80
+#define                STICK_DIGITAL_D 0x40
+#define                STICK_DIGITAL_L 0x20
+#define                STICK_DIGITAL_R 0x10
+#define STICK_ANALOG   0x30            /* 16bit signed X / Y, sign */
+
+/* No device number - but 3 bits reserved if needed */
+#define KEYPRESS_CODE  0x40            /* Followed by keycode byte. Number
+                                           bits show u/d and modifiers */
+#define                KEYPRESS_DOWN   0x00
+#define                KEYPRESS_UP     0x01
+#define                KEYPRESS_SHIFT  0x02
+#define                KEYPRESS_CTRL   0x04
+#define                kEYPRESS_ALT    0x08
+
+#define        LIGHTPEN_ABS    0x50            /* Light pen or similar, 16 x 16bit virtual coords */
+
+#define BUTTON(x)      (1 << (x))      /* Button 1-7 (top bit never used) */
+#define BUTTONS(x)     ((x)&0x07)      /* 0-7 buttons */
+
+
+#define INPUT_GRABKB   0x0520
+#define                INPUT_GRAB_NONE         0       /* No grab */
+#define                INPUT_GRAB_META         1       /* Special keys only */
+#define                INPUT_GRAB_TYPED        2       /* Typed input */
+#define                INPUT_GRAB_ALL          3       /* Up and down events */
+
+#endif
\ No newline at end of file