aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorFabian Lesniak <fabian@lesniak-it.de>2016-12-06 20:00:06 +0100
committerGerd Hoffmann <kraxel@redhat.com>2017-01-31 08:14:51 +0100
commit8b0caab07bf0056f44b52eb335faa45f07b7e1a6 (patch)
tree5d3463486590f086e3a6ff1217bace97474bc9ac /include/hw
parent0095cc62b6803d5e2cb8cb27e5b14657d9dc0c95 (diff)
ps2: add support for mice with extra/side buttons
This enables the ps2 controller to process mouse events for buttons 4 and 5. Additionally, distinct definitions for the ps2 mouse button state are introduced. The legacy definitions from console.h are not used anymore. Signed-off-by: Fabian Lesniak <fabian@lesniak-it.de> Message-id: 20161206190007.7539-3-fabian@lesniak-it.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/input/ps2.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/input/ps2.h b/include/hw/input/ps2.h
index b9ceee4154..0fec91cdb0 100644
--- a/include/hw/input/ps2.h
+++ b/include/hw/input/ps2.h
@@ -25,6 +25,12 @@
#ifndef HW_PS2_H
#define HW_PS2_H
+#define PS2_MOUSE_BUTTON_LEFT 0x01
+#define PS2_MOUSE_BUTTON_MIDDLE 0x02
+#define PS2_MOUSE_BUTTON_RIGHT 0x04
+#define PS2_MOUSE_BUTTON_SIDE 0x08
+#define PS2_MOUSE_BUTTON_EXTRA 0x10
+
/* ps2.c */
void *ps2_kbd_init(void (*update_irq)(void *, int), void *update_arg);
void *ps2_mouse_init(void (*update_irq)(void *, int), void *update_arg);