input: add event routing and multiseat support.
input: misc bugfixes and minor improvements. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTguLNAAoJEEy22O7T6HE4d3MP/2+JYwz9ZiCuzBTriUDvMGpg ujCT5bk2Dcd3wHlrFfRX2saRxskcWstWrOuy6IwygSSpPRlqF67gLUqgByjAwFwJ g/JA4BGKrsFsI20XWkzB55e4FmbA+eixBEnDnuUHwvJebS1aCHNrb352E9nWFMne opsbpkCFkZULMXsqnELgsldqTaW0huSgdOFa0WsCPWi9rMdJL2SJjDvLgUlP4YVB v22AYSpZBd4TB+pSRxiUb2f4fVuAyaV5rCubJDKGLaKUuPZf3+2x664XuqYZ8RvI sOi6r2viamy7NuD9C6YOz2hwqeFj6A15viBo8KZmotAHB6/hi/3I0rLAQsRgxsGh zxNRHtOkF6n237KMWk7wh7SqGXtCr7mCe750bFru1W3FqlGlODAPYgIFODz1L50G 51nlrXroFMkpM0FsLARtaeMoKo4k8e1o+08R9wVwkyNz+sPwlW7yoQKOlyWfmeKe GTTvRJWmggF3pqf6LEIQrgOQyBuArrX4SR1AeRzhYmw/H5h+Df7oeHAlv2Yx6Sus mAit/ExI9HeTE2BwyXCzu99LFAmogRvvB+45dbwC9INf537p9hdyKCyrFU1uQofw lw3cCfyNZu0BQR0YUpR2NCaFfWWkPQehi19kpKOpyiKscYy7RNJr10vaz9FuFppv x9nOKTuiaAMGIyJwWfmU =oPCg -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-9' into staging input: add event routing and multiseat support. input: misc bugfixes and minor improvements. # gpg: Signature made Mon 26 May 2014 07:44:29 BST using RSA key ID D3E87138 # gpg: Can't check signature: public key not found * remotes/kraxel/tags/pull-input-9: docs: add multiseat.txt usb: add input routing support for tablet and keyboard sdl: pass key event source to input layer input: bind devices and input routing input: switch hid mouse and tablet to the new input layer api. input: switch hid keyboard to new input layer api. input: keymap: add meta keys input: add name to input_event_key_number input: add qemu_input_key_number_to_qcode input (curses): mask keycodes to remove modifier bits Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4aa23452e3
10 changed files with 309 additions and 99 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define QEMU_HID_H
|
||||
|
||||
#include "migration/vmstate.h"
|
||||
#include "ui/input.h"
|
||||
|
||||
#define HID_MOUSE 1
|
||||
#define HID_TABLET 2
|
||||
|
|
@ -22,7 +23,6 @@ typedef void (*HIDEventFunc)(HIDState *s);
|
|||
typedef struct HIDMouseState {
|
||||
HIDPointerEvent queue[QUEUE_LENGTH];
|
||||
int mouse_grabbed;
|
||||
QEMUPutMouseEntry *eh_entry;
|
||||
} HIDMouseState;
|
||||
|
||||
typedef struct HIDKeyboardState {
|
||||
|
|
@ -31,7 +31,6 @@ typedef struct HIDKeyboardState {
|
|||
uint8_t leds;
|
||||
uint8_t key[16];
|
||||
int32_t keys;
|
||||
QEMUPutKbdEntry *eh_entry;
|
||||
} HIDKeyboardState;
|
||||
|
||||
struct HIDState {
|
||||
|
|
@ -47,6 +46,7 @@ struct HIDState {
|
|||
bool idle_pending;
|
||||
QEMUTimer *idle_timer;
|
||||
HIDEventFunc event;
|
||||
QemuInputHandlerState *s;
|
||||
};
|
||||
|
||||
void hid_init(HIDState *hs, int kind, HIDEventFunc event);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ QemuInputHandlerState *qemu_input_handler_register(DeviceState *dev,
|
|||
void qemu_input_handler_activate(QemuInputHandlerState *s);
|
||||
void qemu_input_handler_deactivate(QemuInputHandlerState *s);
|
||||
void qemu_input_handler_unregister(QemuInputHandlerState *s);
|
||||
void qemu_input_handler_bind(QemuInputHandlerState *s,
|
||||
const char *device_id, int head,
|
||||
Error **errp);
|
||||
void qemu_input_event_send(QemuConsole *src, InputEvent *evt);
|
||||
void qemu_input_event_sync(void);
|
||||
|
||||
|
|
@ -36,6 +39,7 @@ InputEvent *qemu_input_event_new_key(KeyValue *key, bool down);
|
|||
void qemu_input_event_send_key(QemuConsole *src, KeyValue *key, bool down);
|
||||
void qemu_input_event_send_key_number(QemuConsole *src, int num, bool down);
|
||||
void qemu_input_event_send_key_qcode(QemuConsole *src, QKeyCode q, bool down);
|
||||
int qemu_input_key_number_to_qcode(uint8_t nr);
|
||||
int qemu_input_key_value_to_number(const KeyValue *value);
|
||||
int qemu_input_key_value_to_qcode(const KeyValue *value);
|
||||
int qemu_input_key_value_to_scancode(const KeyValue *value, bool down,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue