client-core: a chord with an uppercase ASCII letter parses but never fires #386

Closed
opened 2026-09-25 00:48:14 +09:00 by natsukium · 1 comment
Owner

A keymap chord written with an uppercase ASCII letter (e.g. "shift+A") parses without a warning but can never match.

  • crates/felis-client-core/src/keymap/chord.rs stores A as Character("A") with no normalization.
  • crates/felis-client/src/keymap_adapter.rs (lift_uppercase_letter) lowercases every uppercase ASCII letter from winit and adds SHIFT, so the runtime chord is always shift+a.
  • keymap/default.rs already stores letter chords lowercase.

docs/reference/keybindings.md now documents the current behavior (ASCII letters match lowercase with Shift as a modifier). Decide which of these the parser should do:

  1. fold an uppercase ASCII letter to lowercase + SHIFT, or
  2. reject it with a config diagnostic naming the key path (fits the unknown-token warning style of REQ-1103).

Either way, update the keybindings.md chord grammar to match.

A keymap chord written with an uppercase ASCII letter (e.g. `"shift+A"`) parses without a warning but can never match. - `crates/felis-client-core/src/keymap/chord.rs` stores `A` as `Character("A")` with no normalization. - `crates/felis-client/src/keymap_adapter.rs` (`lift_uppercase_letter`) lowercases every uppercase ASCII letter from winit and adds SHIFT, so the runtime chord is always `shift+a`. - `keymap/default.rs` already stores letter chords lowercase. `docs/reference/keybindings.md` now documents the current behavior (ASCII letters match lowercase with Shift as a modifier). Decide which of these the parser should do: 1. fold an uppercase ASCII letter to lowercase + SHIFT, or 2. reject it with a config diagnostic naming the key path (fits the unknown-token warning style of REQ-1103). Either way, update the keybindings.md chord grammar to match.
Author
Owner

Decision: option 1. The parser folds an uppercase ASCII letter to its lowercase letter plus SHIFT ("A" and "shift+A" both parse as shift+a), the same rule lift_uppercase_letter already applies to winit's events at runtime, so the written and the pressed chord follow one rule and configs that parse today start firing. Update the keybindings.md chord grammar to state the fold.

Decision: option 1. The parser folds an uppercase ASCII letter to its lowercase letter plus SHIFT (`"A"` and `"shift+A"` both parse as `shift+a`), the same rule `lift_uppercase_letter` already applies to winit's events at runtime, so the written and the pressed chord follow one rule and configs that parse today start firing. Update the keybindings.md chord grammar to state the fold.
Commenting is not possible because the repository is archived.
No description provided.