From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [PULL 4/5] For curses display, recognize a few more control keys
Date: Tue, 25 Jul 2023 11:25:02 +0100 [thread overview]
Message-ID: <20230725102503.2283907-5-peter.maydell@linaro.org> (raw)
In-Reply-To: <20230725102503.2283907-1-peter.maydell@linaro.org>
From: Sean Estabrooks <sean.estabrooks@gmail.com>
The curses display handles most control-X keys, and translates
them into their corresponding keycode. Here we recognize
a few that are missing, Ctrl-@ (null), Ctrl-\ (backslash),
Ctrl-] (right bracket), Ctrl-^ (caret), Ctrl-_ (underscore).
Signed-off-by: Sean Estabrooks <sean.estabrooks@gmail.com>
Message-id: CAHyVn3Bh9CRgDuOmf7G7Ngwamu8d4cVozAcB2i4ymnnggBXNmg@mail.gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
ui/curses_keys.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ui/curses_keys.h b/ui/curses_keys.h
index 71e04acdc75..88a2208ed18 100644
--- a/ui/curses_keys.h
+++ b/ui/curses_keys.h
@@ -210,6 +210,12 @@ static const int _curses2keycode[CURSES_CHARS] = {
['N' - '@'] = 49 | CNTRL, /* Control + n */
/* Control + m collides with the keycode for Enter */
+ ['@' - '@'] = 3 | CNTRL, /* Control + @ */
+ /* Control + [ collides with the keycode for Escape */
+ ['\\' - '@'] = 43 | CNTRL, /* Control + Backslash */
+ [']' - '@'] = 27 | CNTRL, /* Control + ] */
+ ['^' - '@'] = 7 | CNTRL, /* Control + ^ */
+ ['_' - '@'] = 12 | CNTRL, /* Control + Underscore */
};
static const int _curseskey2keycode[CURSES_KEYS] = {
--
2.34.1
next prev parent reply other threads:[~2023-07-25 10:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 10:24 [PULL 0/5] target-arm queue Peter Maydell
2023-07-25 10:24 ` [PULL 1/5] hw/arm/smmu: Handle big-endian hosts correctly Peter Maydell
2023-07-25 10:25 ` [PULL 2/5] scripts/git-submodule.sh: Don't rely on non-POSIX 'read' behaviour Peter Maydell
2023-07-25 10:25 ` [PULL 3/5] target/arm: Special case M-profile in debug_helper.c code Peter Maydell
2023-07-25 10:25 ` Peter Maydell [this message]
2023-07-25 10:25 ` [PULL 5/5] tests/decode: Suppress "error: " string for expected-failure tests Peter Maydell
2023-07-25 14:49 ` [PULL 0/5] target-arm queue 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=20230725102503.2283907-5-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--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).