diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-01-22 10:28:13 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-05 10:45:44 +0100 |
commit | 4ed26e19d90bf5a4ea5662118ae5a2af46e61d36 (patch) | |
tree | 9c158c2ce5452370cd575f1d38f52ae9bbb7761a /ui/vnc.c | |
parent | c2f2ba4983aa1dd634e78347706e6585afc1f2a0 (diff) | |
download | qemu-4ed26e19d90bf5a4ea5662118ae5a2af46e61d36.zip qemu-4ed26e19d90bf5a4ea5662118ae5a2af46e61d36.tar.gz qemu-4ed26e19d90bf5a4ea5662118ae5a2af46e61d36.tar.bz2 |
keymap: pass full keyboard state to keysym2scancode
Pass the keyboard state tracker handle down to keysym2scancode(),
so the code can fully inspect the keyboard state as needed. No
functional change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20190122092814.14919-8-kraxel@redhat.com
Diffstat (limited to 'ui/vnc.c')
-rw-r--r-- | ui/vnc.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1973,9 +1973,6 @@ static const char *code2name(int keycode) static void key_event(VncState *vs, int down, uint32_t sym) { - bool shift = qkbd_state_modifier_get(vs->vd->kbd, QKBD_MOD_SHIFT); - bool altgr = qkbd_state_modifier_get(vs->vd->kbd, QKBD_MOD_ALTGR); - bool ctrl = qkbd_state_modifier_get(vs->vd->kbd, QKBD_MOD_CTRL); int keycode; int lsym = sym; @@ -1984,7 +1981,7 @@ static void key_event(VncState *vs, int down, uint32_t sym) } keycode = keysym2scancode(vs->vd->kbd_layout, lsym & 0xFFFF, - shift, altgr, ctrl) & SCANCODE_KEYMASK; + vs->vd->kbd) & SCANCODE_KEYMASK; trace_vnc_key_event_map(down, sym, keycode, code2name(keycode)); do_key_event(vs, down, keycode, sym); } |