From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PULL 4/6] sdl2: enable ctrl modifier keys for text consoles
Date: Mon, 9 Apr 2018 11:40:58 +0200 [thread overview]
Message-ID: <20180409094100.27650-5-kraxel@redhat.com> (raw)
In-Reply-To: <20180409094100.27650-1-kraxel@redhat.com>
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>
---
ui/sdl2-input.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
}
}
--
2.9.3
next prev parent reply other threads:[~2018-04-09 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 9:40 [Qemu-devel] [PULL 0/6] Ui 20180409 patches Gerd Hoffmann
2018-04-09 9:40 ` [Qemu-devel] [PULL 1/6] sdl2: Remove unused epoxy include Gerd Hoffmann
2018-04-09 9:40 ` [Qemu-devel] [PULL 2/6] ui: add ctrl modifier support to kbd_put_qcode_console() Gerd Hoffmann
2018-04-09 9:40 ` [Qemu-devel] [PULL 3/6] sdl2: track kbd modifier state unconditionally Gerd Hoffmann
2018-04-09 9:40 ` Gerd Hoffmann [this message]
2018-04-09 9:40 ` [Qemu-devel] [PULL 5/6] sdl2: drop QEMU_KEY_BACKSPACE special case Gerd Hoffmann
2018-04-09 9:41 ` [Qemu-devel] [PULL 6/6] sdl2: drop dead code Gerd Hoffmann
2018-04-09 13:11 ` [Qemu-devel] [PULL 0/6] Ui 20180409 patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180409094100.27650-5-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).