aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/input-legacy.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/input-legacy.c b/ui/input-legacy.c
index 6bc3525499..c75aba1549 100644
--- a/ui/input-legacy.c
+++ b/ui/input-legacy.c
@@ -76,6 +76,11 @@ static KeyValue *copy_key_value(KeyValue *src)
{
KeyValue *dst = g_new(KeyValue, 1);
memcpy(dst, src, sizeof(*src));
+ if (dst->type == KEY_VALUE_KIND_NUMBER) {
+ QKeyCode code = qemu_input_key_number_to_qcode(dst->u.number.data);
+ dst->type = KEY_VALUE_KIND_QCODE;
+ dst->u.qcode.data = code;
+ }
return dst;
}