From: Alexey Gladkov <legion@kernel.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: kbd@lists.linux.dev
Subject: Re: [PATCH v2] Add Backtab keysym and update keymaps to use it for Shift+Tab
Date: Fri, 20 Feb 2026 14:02:41 +0100 [thread overview]
Message-ID: <aZhbceP5TfpXzu8H@example.org> (raw)
In-Reply-To: <879pq1p7-76rr-n272-3922-3r3q04q9r7n7@syhkavp.arg>
On Tue, Feb 17, 2026 at 12:28:35PM -0500, Nicolas Pitre wrote:
> Add a new Backtab keysym (KT_FN index 30) that produces the standard
> backtab escape sequence \e[Z. This replaces F246 which was unused.
>
> Update all keymaps to use Backtab for Shift+Tab instead of Meta_Tab.
> In most cases the Meta_Tab binding already existed for Alt+Tab; where
> it was missing, it has been added.
>
> This change affects keymaps across all architectures: i386, amiga,
> atari, mac, sun, and pine.
>
> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Sorry for the delay. This change is user visible and my tests broke.
> diff --git a/src/libkeymap/parser.y b/src/libkeymap/parser.y
> index 2cd509f..fcb8c9b 100644
> --- a/src/libkeymap/parser.y
> +++ b/src/libkeymap/parser.y
> @@ -79,7 +79,7 @@ static int
> strings_as_usual(struct lk_ctx *ctx)
> {
> /*
> - * 26 strings, mostly inspired by the VT100 family
> + * 27 strings, mostly inspired by the VT100 family
> */
> const char *stringvalues[] = {
> /* F1 .. F20 */
> @@ -90,8 +90,8 @@ strings_as_usual(struct lk_ctx *ctx)
> "\033[31~", "\033[32~", "\033[33~", "\033[34~",
> /* Find, Insert, Remove, Select, Prior */
> "\033[1~", "\033[2~", "\033[3~", "\033[4~", "\033[5~",
> - /* Next, Macro, Help, Do, Pause */
> - "\033[6~", NULL, NULL, NULL, NULL
> + /* Next, Macro, Help, Do, Pause, Backtab */
> + "\033[6~", NULL, NULL, NULL, NULL, "\033[Z"
> };
> unsigned char i;
>
> diff --git a/src/libkeymap/syms.ktyp.h b/src/libkeymap/syms.ktyp.h
> index 82c87a6..cd0404c 100644
> --- a/src/libkeymap/syms.ktyp.h
> +++ b/src/libkeymap/syms.ktyp.h
> @@ -278,6 +278,7 @@ static const char *const fn_syms[] = {
> "Help",
> "Do",
> "Pause",
> + "Backtab",
> "F21", "F22", "F23", "F24", "F25",
> "F26", "F27", "F28", "F29", "F30",
> "F31", "F32", "F33", "F34", "F35",
I noticed that this change complicates the use of the uapi kernel. You
added a value in the middle and shifted the other values. So K_F21 became
"Backtab", and K_F22 in kbd is named "F21", and so on.
This will confuse users.
ioctl(<fd>, KDSKBSENT, {kb_func=KVAL(K_PGUP), kb_string="\33[5~"}) = 0
ioctl(<fd>, KDSKBSENT, {kb_func=KVAL(K_PGDN), kb_string="\33[6~"}) = 0
ioctl(<fd>, KDSKBSENT, {kb_func=KVAL(K_F21), kb_string="\33[Z"}) = 0
$ grep -A1 -B1 -w K_F21 include/uapi/linux/keyboard.h
#define K_PAUSE K(KT_FN,29)
#define K_F21 K(KT_FN,30)
#define K_F22 K(KT_FN,31)
> @@ -323,7 +324,7 @@ static const char *const fn_syms[] = {
> "F231", "F232", "F233", "F234", "F235",
> "F236", "F237", "F238", "F239", "F240",
> "F241", "F242", "F243", "F244", "F245",
> - "F246" /* there are 10 keys named Insert etc., total 256 */
> + /* 11 keys named Find through Backtab, total 256 */
> };
>
> /*
>
--
Rgrds, legion
prev parent reply other threads:[~2026-02-20 13:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 17:28 [PATCH v2] Add Backtab keysym and update keymaps to use it for Shift+Tab Nicolas Pitre
2026-02-20 13:02 ` Alexey Gladkov [this message]
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=aZhbceP5TfpXzu8H@example.org \
--to=legion@kernel.org \
--cc=kbd@lists.linux.dev \
--cc=nico@fluxnic.net \
/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