All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] support for the kernel 7.1 modifier-aware KT_CSI keysym type
@ 2026-06-12  1:48 Nicolas Pitre
  2026-06-12  1:48 ` [PATCH 1/3] libkeymap: add support for " Nicolas Pitre
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nicolas Pitre @ 2026-06-12  1:48 UTC (permalink / raw)
  To: kbd; +Cc: gladkov.alexey

Linux kernel 7.1 introduces modifier-aware escape sequence generation
for the console keyboard:

  4af70f151671 ("vt: add modifier support to cursor keys")
  5cba06c71c71 ("vt: add KT_CSI keysym type for modifier-aware CSI sequences")
  c1d2deb6492f ("vt: add fallback to plain map for modifier-aware key types")

The new KT_CSI keysym type produces xterm-style CSI tilde sequences
(ESC [ n ~, or ESC [ n ; mod ~ when Shift/Alt/Control are held) with
the modifier state encoded at runtime. A single plain map entry covers
all modifier combinations, instead of consuming a func_table string
slot per combination. These changes are in Linus's tree and part of
the 7.1 release.

This series adds the userspace counterpart:

Patch 1 teaches libkeymap the Csi_* keysym names (Csi_Home, Csi_End,
Csi_Delete, Csi_Insert, Csi_PgUp, Csi_PgDn, Csi_F1..Csi_F20, matching
the kernel UAPI values) and documents modifier-aware keys in
keymaps(5).

Patch 2 adds a contrib script (with optional systemd unit) that
reconciles the "linux" terminfo entry with the loaded keymap: F1-F5
in CSI form and Backtab as ESC [ Z are not what the stock terminfo
entry expects. The script rebuilds an /etc/terminfo override from the
distribution's pristine entry and tags it with a marker so it never
touches an administrator-provided override.

Patch 3 converts the shared i386 keymap include files to the new
keysyms. Legacy copies of the include files are preserved for systems
running older kernels. On a pre-7.1 kernel the new keysyms load
without effect on Unicode-mode consoles, so function and navigation
keys would be inert there; the legacy includes retain the historical
behavior.

Tested with make check, and the terminfo script exercised live
(keymap loading, override creation/idempotence/removal, restoration)
on Fedora 43.

Nicolas Pitre (3):
  libkeymap: add support for KT_CSI keysym type
  Add kbd-terminfo-fixup script and systemd service
  keymaps: convert include files to use CSI keysyms

 .gitignore                                    |   1 +
 Makefile.am                                   |  16 ++
 configure.ac                                  |  18 ++
 contrib/kbd-terminfo-fixup                    | 222 ++++++++++++++++++
 contrib/kbd-terminfo-fixup.service.in         |  13 +
 .../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 ++--
 docs/man/man5/keymaps.5                       |  77 ++++++
 src/libkeymap/ksyms.c                         |   3 +-
 src/libkeymap/syms.ktyp.h                     |  39 +++
 tests/data/keymap0-summary.txt                |  26 ++
 15 files changed, 770 insertions(+), 104 deletions(-)
 create mode 100755 contrib/kbd-terminfo-fixup
 create mode 100644 contrib/kbd-terminfo-fixup.service.in
 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

-- 
2.54.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-22  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.