diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-23 14:16:34 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-23 14:16:35 -0500 |
commit | 64afc2b4d48fb21e085517c38a59a3f61a11283c (patch) | |
tree | bd5bb47861b2fa77d81d37dd684e1be46005ceec /ui/input.c | |
parent | 95de21a430f7bc4166a153b1f69b1425c8a99c7b (diff) | |
parent | 70e098af88f79340d420992af526254866a42ddd (diff) | |
download | hqemu-64afc2b4d48fb21e085517c38a59a3f61a11283c.zip hqemu-64afc2b4d48fb21e085517c38a59a3f61a11283c.tar.gz |
Merge remote-tracking branch 'luiz/queue/qmp' into staging
# By Michael Roth (10) and others
# Via Luiz Capitulino
* luiz/queue/qmp:
monitor: allow to disable the default monitor
ui/input.c: replace magic numbers with macros
qapi: add native list coverage for QMP input visitor tests
qapi: add native list coverage for QMP output visitor tests
qapi: add native list coverage for visitor serialization tests
qapi: fix visitor serialization tests for numbers/doubles
qapi: add QMP input test for large integers
json-parser: fix handling of large whole number values
qapi: enable generation of native list code
qapi: qapi-visit.py, native list support
qapi: qapi-visit.py, fix list handling for union types
qapi: qapi-types.py, native list support
Message-id: 1369333232-24145-1-git-send-email-lcapitulino@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/input.c')
-rw-r--r-- | ui/input.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -28,6 +28,7 @@ #include "qapi/error.h" #include "qmp-commands.h" #include "qapi-types.h" +#include "ui/keymaps.h" struct QEMUPutMouseEntry { QEMUPutMouseEvent *qemu_put_mouse_event; @@ -260,10 +261,10 @@ static void free_keycodes(void) static void release_keys(void *opaque) { while (keycodes_size > 0) { - if (keycodes[--keycodes_size] & 0x80) { - kbd_put_keycode(0xe0); + if (keycodes[--keycodes_size] & SCANCODE_GREY) { + kbd_put_keycode(SCANCODE_EMUL0); } - kbd_put_keycode(keycodes[keycodes_size] | 0x80); + kbd_put_keycode(keycodes[keycodes_size] | SCANCODE_UP); } free_keycodes(); @@ -297,10 +298,10 @@ void qmp_send_key(KeyValueList *keys, bool has_hold_time, int64_t hold_time, return; } - if (keycode & 0x80) { - kbd_put_keycode(0xe0); + if (keycode & SCANCODE_GREY) { + kbd_put_keycode(SCANCODE_EMUL0); } - kbd_put_keycode(keycode & 0x7f); + kbd_put_keycode(keycode & SCANCODE_KEYCODEMASK); keycodes = g_realloc(keycodes, sizeof(int) * (keycodes_size + 1)); keycodes[keycodes_size++] = keycode; |