input: switch hid keyboard to new input layer api.

Minimal patch to get the switchover done.  We continue processing ps/2
scancodes for now as they are part of the live migration stream.  Fixing
that, then mapping directly from QKeyValue to HID keycodes is left as
excercise for another day.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2014-03-11 13:52:27 +01:00
parent 86846bfe64
commit 1ff5eedd1d
2 changed files with 24 additions and 8 deletions

View file

@ -2,6 +2,7 @@
#define QEMU_HID_H
#include "migration/vmstate.h"
#include "ui/input.h"
#define HID_MOUSE 1
#define HID_TABLET 2
@ -31,7 +32,6 @@ typedef struct HIDKeyboardState {
uint8_t leds;
uint8_t key[16];
int32_t keys;
QEMUPutKbdEntry *eh_entry;
} HIDKeyboardState;
struct HIDState {
@ -47,6 +47,7 @@ struct HIDState {
bool idle_pending;
QEMUTimer *idle_timer;
HIDEventFunc event;
QemuInputHandlerState *s;
};
void hid_init(HIDState *hs, int kind, HIDEventFunc event);