Skip to content

docs(pain-control): remove incorrect case-insensitivity note#31

Merged
psmux merged 1 commit into
psmux:mainfrom
MattKotsenas:fix/pain-control-case-note
Jul 17, 2026
Merged

docs(pain-control): remove incorrect case-insensitivity note#31
psmux merged 1 commit into
psmux:mainfrom
MattKotsenas:fix/pain-control-case-note

Conversation

@MattKotsenas

@MattKotsenas MattKotsenas commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

The NOTE claims psmux treats key bindings case-insensitively (H == h), but psmux binding lookup is case-sensitive: in psmux core (psmux/psmux), normalize_key_for_binding in src/config.rs strips Shift while preserving character case, so h and H resolve to distinct bindings.

The note uses that false premise to justify the Alt-based resize keys; the section header (# PANE RESIZING (Alt + vim keys)) already documents the Alt keys, so removing the note loses nothing.

psmux binding lookup is case-sensitive: normalize_key_for_binding strips Shift but preserves character case, so h and H are distinct bindings. The removed note claimed H == h and used it to justify the Alt-based resize keys; the section header already documents the Alt keys.
@psmux
psmux merged commit c5de07f into psmux:main Jul 17, 2026
@psmux

psmux commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Hey @MattKotsenas, thanks for catching this. I went and checked it two ways before merging.

First, in psmux core itself: normalize_key_for_binding in src/config.rs (around line 1433) only ever strips KeyModifiers::SHIFT from the modifier set. It never touches key.0, so a KeyCode::Char('h') and a KeyCode::Char('H') stay two completely different values all the way through binding resolution. There is no lowercasing anywhere in that path.

Second, I proved it live rather than trusting the read. On an isolated psmux -L reviewtest server I bound h and H in the prefix table to two different set-option calls, then drove real keystrokes into the console with a WriteConsoleInput injector (CLI send-keys bypasses the client's key dispatch entirely, so it will not exercise this path, worth remembering for future tests). prefix+h set the option to lower-h, and prefix+H (Shift held) set it to upper-H. Two distinct results, so the old NOTE was simply wrong: psmux does not treat bindings case-insensitively.

Merged as c5de07f. Appreciate you tightening up the docs.

@MattKotsenas
MattKotsenas deleted the fix/pain-control-case-note branch July 17, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants