diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2014-03-11 12:15:39 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-05-16 08:30:11 +0200 |
commit | 02aa76c2ba5df8db7c968d92959af2a7c35690a8 (patch) | |
tree | bf80789166d651d63c71dd1c74747026bf5ba303 /include | |
parent | 2858ab09e6f708e381fc1a1cc87e747a690c4884 (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')
-rw-r--r-- | include/ui/input.h | 4 |
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); |