mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nicolas Pitre <nico@fluxnic.net>
Cc: Jiri Slaby <jirislaby@kernel.org>,
	Alexey Gladkov <legion@kernel.org>,
	Nicolas Pitre <npitre@baylibre.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/3] vt: add modifier support to cursor and navigation keys
Date: Sun, 8 Feb 2026 16:28:09 +0100	[thread overview]
Message-ID: <2026020851-bullhorn-glitch-0e37@gregkh> (raw)
In-Reply-To: <20260203045457.1049793-1-nico@fluxnic.net>

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

  parent reply	other threads:[~2026-02-08 15:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03  4:52 Nicolas Pitre
2026-02-03  4:52 ` [PATCH 1/3] vt: add modifier support to cursor keys Nicolas Pitre
2026-02-03  4:52 ` [PATCH 2/3] vt: add KT_CSI keysym type for modifier-aware CSI sequences Nicolas Pitre
2026-02-03  4:52 ` [PATCH 3/3] vt: add fallback to plain map for modifier-aware key types Nicolas Pitre
2026-02-08 15:28 ` Greg Kroah-Hartman [this message]
2026-02-08 16:22   ` [PATCH 0/3] vt: add modifier support to cursor and navigation keys Nicolas Pitre
2026-02-10  6:53     ` Greg Kroah-Hartman
2026-03-06 18:26       ` Nicolas Pitre
2026-03-12 13:48         ` Greg Kroah-Hartman
2026-03-12 18:56           ` Nicolas Pitre
2026-03-13  7:11             ` Greg Kroah-Hartman
2026-03-13  8:38               ` Greg Kroah-Hartman
2026-03-09 12:35     ` Alexey Gladkov

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=2026020851-bullhorn-glitch-0e37@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=legion@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=npitre@baylibre.com \
    /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

all inboxes | Powered by JetHome®