diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-03-21 14:50:38 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-04-09 10:40:47 +0200 |
commit | 3dd2ca54fbec8928cca922dc8edc9a064d33f934 (patch) | |
tree | 258f4d7347fa642a00918bc1b0ee3ad3f54ac861 /ui/sdl2-input.c | |
parent | 34013c379340c5a1ebe0b9a5a63d6e157111d2ec (diff) |
sdl2: enable ctrl modifier keys for text consoles
Unbreaks ctrl-pageup/pagedown scrollback.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180321135041.15768-4-kraxel@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl2-input.c')
-rw-r--r-- | ui/sdl2-input.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 8d0d9ba17c..62c2b58ef0 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -90,6 +90,8 @@ void sdl2_process_key(struct sdl2_console *scon, } if (!qemu_console_is_graphic(con)) { + bool ctrl = (modifiers_state[SDL_SCANCODE_LCTRL] || + modifiers_state[SDL_SCANCODE_RCTRL]); if (ev->type == SDL_KEYDOWN) { switch (ev->keysym.scancode) { case SDL_SCANCODE_RETURN: @@ -99,7 +101,7 @@ void sdl2_process_key(struct sdl2_console *scon, kbd_put_keysym_console(con, QEMU_KEY_BACKSPACE); break; default: - kbd_put_qcode_console(con, qcode, false); + kbd_put_qcode_console(con, qcode, ctrl); break; } } |