@@ -70,8 +70,6 @@ typedef struct QEMUPutMouseEntry QEMUPutMouseEntry;
typedef struct QEMUPutKbdEntry QEMUPutKbdEntry;
typedef struct QEMUPutLEDEntry QEMUPutLEDEntry;
-QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func,
- void *opaque);
QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func,
void *opaque, int absolute,
const char *name);
@@ -109,43 +109,6 @@ void qmp_send_key(KeyValueList *keys, bool has_hold_time, int64_t hold_time,
g_free(up);
}
-static void legacy_kbd_event(DeviceState *dev, QemuConsole *src,
- InputEvent *evt)
-{
- QEMUPutKbdEntry *entry = (QEMUPutKbdEntry *)dev;
- int scancodes[3], i, count;
- InputKeyEvent *key = evt->u.key.data;
-
- if (!entry || !entry->put_kbd) {
- return;
- }
- count = qemu_input_key_value_to_scancode(key->key,
- key->down,
- scancodes);
- for (i = 0; i < count; i++) {
- entry->put_kbd(entry->opaque, scancodes[i]);
- }
-}
-
-static const QemuInputHandler legacy_kbd_handler = {
- .name = "legacy-kbd",
- .mask = INPUT_EVENT_MASK_KEY,
- .event = legacy_kbd_event,
-};
-
-QEMUPutKbdEntry *qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
-{
- QEMUPutKbdEntry *entry;
-
- entry = g_new0(QEMUPutKbdEntry, 1);
- entry->put_kbd = func;
- entry->opaque = opaque;
- entry->s = qemu_input_handler_register((DeviceState *)entry,
- &legacy_kbd_handler);
- qemu_input_handler_activate(entry->s);
- return entry;
-}
-
static void legacy_mouse_event(DeviceState *dev, QemuConsole *src,
InputEvent *evt)
{
Since the last keyboard device has now been converted over to use qemu_input_handler_register(), the legacy qemu_add_kbd_event_handler() function is now unused and can be removed. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> --- include/ui/console.h | 2 -- ui/input-legacy.c | 37 ------------------------------------- 2 files changed, 39 deletions(-)