All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Gladkov <legion@kernel.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: kbd@lists.linux.dev
Subject: Re: [PATCH 3/3] keymaps: convert include files to use CSI keysyms
Date: Mon, 22 Jun 2026 10:58:17 +0200	[thread overview]
Message-ID: <ajj5KcnDWQ7NTuaF@example.org> (raw)
In-Reply-To: <20260612014857.1668427-4-nico@fluxnic.net>

On Thu, Jun 11, 2026 at 09:48:57PM -0400, Nicolas Pitre wrote:
> Convert the shared keymap include files to use the new Csi_* keysyms
> for function keys (F1-F12) and navigation keys (Home, End, Insert,
> Delete, PageUp, PageDown). This fixes the long-standing discrepancy
> where F1-F5 used non-standard sequences (\e[[A through \e[[E) while
> F6 and above used standard CSI sequences.
> 
> The Csi_* keysyms automatically encode modifier state into the output
> sequence, so explicit shift/control bindings for F13-F36 are no longer
> needed and have been removed. The alt/control-alt bindings for console
> switching (Console_1 through Console_24) and other special actions
> (Scroll_Backward, Scroll_Forward, Boot) are preserved.
> 
> Updated files:
>   - linux-keys-bare.inc
>   - linux-keys-extd.inc
>   - linux-with-modeshift-altgr.inc
> 
> Legacy versions of these files are preserved as *-legacy.inc for
> keymaps that need the old F1-F246 keysym behavior.
> 
> Note: Standalone keymaps that don't use these include files (such as
> defkeymap.map and various language-specific keymaps) are not updated
> and will continue to use the legacy keysyms.
> 
> Note: The Csi_* keysyms require Linux kernel 7.1 or later. Keymaps
> built from these include files will leave the function and navigation
> keys inoperative on older kernels (and loadkeys additionally reports
> errors for them on non-Unicode consoles). Systems that must run
> pre-7.1 kernels should use the *-legacy.inc include files instead.

Existing keymaps continue to include files with their original names
such as linux-keys-bare.inc, etc. After an update, they automatically
become CSI variants. The presence of *-legacy.inc files alongside them
does not help keymaps that are already installed: none of them are
selected automatically.

This patch will break systems with pre-7.1 kernel.

I need to think about how to handle such migration.

> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
> ---
>  .../i386/include/linux-keys-bare-legacy.inc   | 170 ++++++++++++++++++
>  data/keymaps/i386/include/linux-keys-bare.inc |  76 +++-----
>  .../i386/include/linux-keys-extd-legacy.inc   |  37 ++++
>  data/keymaps/i386/include/linux-keys-extd.inc |  23 +--
>  .../linux-with-modeshift-altgr-legacy.inc     | 101 +++++++++++
>  .../include/linux-with-modeshift-altgr.inc    |  52 ++----
>  6 files changed, 356 insertions(+), 103 deletions(-)
>  create mode 100644 data/keymaps/i386/include/linux-keys-bare-legacy.inc
>  create mode 100644 data/keymaps/i386/include/linux-keys-extd-legacy.inc
>  create mode 100644 data/keymaps/i386/include/linux-with-modeshift-altgr-legacy.inc
> 
> diff --git a/data/keymaps/i386/include/linux-with-modeshift-altgr-legacy.inc b/data/keymaps/i386/include/linux-with-modeshift-altgr-legacy.inc
> new file mode 100644
> index 0000000..29012ba
> --- /dev/null
> +++ b/data/keymaps/i386/include/linux-with-modeshift-altgr-legacy.inc
> @@ -0,0 +1,101 @@
> +# For keymaps in which AltGr_Lock is used to switch between two alphabets.
> +#
> +# A common construction is
> +#	alt keycode  42 = AltGr_Lock
> +#	altgr alt keycode  42 = AltGr_Lock
> +#
> +# All Linux keys have the same meaning with or without AltGr.
> +# No convention for Hex_* has been established.
> +
> +include "linux-keys-bare"

linux-with-modeshift-altgr-legacy.inc should include linux-keys-bare-legacy,
not the new linux-keys-bare.

-- 
Rgrds, legion


      reply	other threads:[~2026-06-22  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12  1:48 [PATCH 0/3] support for the kernel 7.1 modifier-aware KT_CSI keysym type Nicolas Pitre
2026-06-12  1:48 ` [PATCH 1/3] libkeymap: add support for " Nicolas Pitre
2026-06-22  8:45   ` Alexey Gladkov
2026-06-12  1:48 ` [PATCH 2/3] Add kbd-terminfo-fixup script and systemd service Nicolas Pitre
2026-06-12  1:48 ` [PATCH 3/3] keymaps: convert include files to use CSI keysyms Nicolas Pitre
2026-06-22  8:58   ` 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=ajj5KcnDWQ7NTuaF@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.