[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2026020851-bullhorn-glitch-0e37@gregkh>
Date: Sun, 8 Feb 2026 16:28:09 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Nicolas Pitre <nico@...xnic.net>
Cc: Jiri Slaby <jirislaby@...nel.org>, Alexey Gladkov <legion@...nel.org>,
Nicolas Pitre <npitre@...libre.com>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] vt: add modifier support to cursor and navigation
keys
On Mon, Feb 02, 2026 at 11:52:45PM -0500, Nicolas Pitre wrote:
> This series adds xterm-style modifier encoding to cursor keys and navigation
> keys on the Linux console.
>
> Modern terminal applications (shells, editors, TUI programs) rely on
> modifier+key combinations like Ctrl+Left, Shift+Home, or Alt+Delete for
> navigation and selection. The xterm protocol encodes these as CSI sequences
> with a modifier parameter (e.g., ESC [ 1 ; 5 D for Ctrl+Left).
>
> While the existing func string table mechanism could technically support
> these sequences, each modifier combination would require a separate entry,
> quickly exhausting the limited string table space. This series instead
> generates the sequences programmatically, providing full modifier support
> without consuming string table entries.
>
> This series addresses that in three patches:
>
> 1. Add modifier encoding to cursor keys (Up/Down/Left/Right). When
> Shift, Alt, or Ctrl are held, the arrow keys now emit sequences like
> ESC [ 1 ; 2 A instead of plain ESC [ A.
>
> 2. Add a new KT_CSI keysym type for navigation keys (Home, End, Insert,
> Delete, PgUp, PgDn) and function keys. These generate CSI tilde
> sequences (ESC [ n ~) with automatic modifier encoding.
>
> 3. Add automatic fallback to the plain keymap for modifier-aware key
> types. This eliminates the need for explicit bindings for each
> modifier combination - a single plain keymap entry handles all
> modifier variants.
>
> The modifier encoding follows the standard xterm convention:
> mod = 1 + (shift ? 1 : 0) + (alt ? 2 : 0) + (ctrl ? 4 : 0)
>
> Explicit keymap bindings take precedence, preserving backward
> compatibility with existing configurations.
>
> Corresponding patches for the kbd package (loadkeys/dumpkeys) are ready
> and will be submitted once this kernel support is available.
>
> diffstat:
> drivers/tty/vt/keyboard.c | 80 ++++++++++++++++++++++++++++++++--
> include/uapi/linux/keyboard.h | 29 +++++++++++++
> 2 files changed, 103 insertions(+), 6 deletions(-)
>
>
Argh, sorry, I saw this patch series too late for this merge window.
I'll review it after -rc1 is out.
thanks,
greg k-h
Powered by blists - more mailing lists