mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 22:42:13 -06:00
input: add name to input_event_key_number
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
11c7fa7fa6
commit
2386a90730
2 changed files with 5 additions and 3 deletions
|
@ -1050,7 +1050,7 @@ gd_update(int x, int y, int w, int h) "x=%d, y=%d, w=%d, h=%d"
|
||||||
gd_key_event(int gdk_keycode, int qemu_keycode, const char *action) "translated GDK keycode %d to QEMU keycode %d (%s)"
|
gd_key_event(int gdk_keycode, int qemu_keycode, const char *action) "translated GDK keycode %d to QEMU keycode %d (%s)"
|
||||||
|
|
||||||
# ui/input.c
|
# ui/input.c
|
||||||
input_event_key_number(int conidx, int number, bool down) "con %d, key number 0x%x, down %d"
|
input_event_key_number(int conidx, int number, const char *qcode, bool down) "con %d, key number 0x%x [%s], down %d"
|
||||||
input_event_key_qcode(int conidx, const char *qcode, bool down) "con %d, key qcode %s, down %d"
|
input_event_key_qcode(int conidx, const char *qcode, bool down) "con %d, key qcode %s, down %d"
|
||||||
input_event_btn(int conidx, const char *btn, bool down) "con %d, button %s, down %d"
|
input_event_btn(int conidx, const char *btn, bool down) "con %d, button %s, down %d"
|
||||||
input_event_rel(int conidx, const char *axis, int value) "con %d, axis %s, value %d"
|
input_event_rel(int conidx, const char *axis, int value) "con %d, axis %s, value %d"
|
||||||
|
|
|
@ -94,7 +94,7 @@ static void qemu_input_transform_abs_rotate(InputEvent *evt)
|
||||||
static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
|
static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
int idx = -1;
|
int qcode, idx = -1;
|
||||||
|
|
||||||
if (src) {
|
if (src) {
|
||||||
idx = qemu_console_get_index(src);
|
idx = qemu_console_get_index(src);
|
||||||
|
@ -103,8 +103,10 @@ static void qemu_input_event_trace(QemuConsole *src, InputEvent *evt)
|
||||||
case INPUT_EVENT_KIND_KEY:
|
case INPUT_EVENT_KIND_KEY:
|
||||||
switch (evt->key->key->kind) {
|
switch (evt->key->key->kind) {
|
||||||
case KEY_VALUE_KIND_NUMBER:
|
case KEY_VALUE_KIND_NUMBER:
|
||||||
|
qcode = qemu_input_key_number_to_qcode(evt->key->key->number);
|
||||||
|
name = QKeyCode_lookup[qcode];
|
||||||
trace_input_event_key_number(idx, evt->key->key->number,
|
trace_input_event_key_number(idx, evt->key->key->number,
|
||||||
evt->key->down);
|
name, evt->key->down);
|
||||||
break;
|
break;
|
||||||
case KEY_VALUE_KIND_QCODE:
|
case KEY_VALUE_KIND_QCODE:
|
||||||
name = QKeyCode_lookup[evt->key->key->qcode];
|
name = QKeyCode_lookup[evt->key->key->qcode];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue