aboutsummaryrefslogtreecommitdiff
path: root/include/ui/input.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-03-11 12:15:39 +0100
committerGerd Hoffmann <kraxel@redhat.com>2014-05-16 08:30:11 +0200
commit02aa76c2ba5df8db7c968d92959af2a7c35690a8 (patch)
treebf80789166d651d63c71dd1c74747026bf5ba303 /include/ui/input.h
parent2858ab09e6f708e381fc1a1cc87e747a690c4884 (diff)
input: key mapping helpers
Add helper functions to translate KeyValue (qapi key representation) into other representations: traditional qemu key numbers, qapi key codes (Q_KEY_CODE_*) and scancode sequences. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/ui/input.h')
-rw-r--r--include/ui/input.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ui/input.h b/include/ui/input.h
index 4976f3da2c..010c903e80 100644
--- a/include/ui/input.h
+++ b/include/ui/input.h
@@ -35,6 +35,10 @@ 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_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,
+ int *codes);
InputEvent *qemu_input_event_new_btn(InputButton btn, bool down);
void qemu_input_queue_btn(QemuConsole *src, InputButton btn, bool down);