Skip to content

fix(flterm): encode Ctrl+Space as a control chord - #163

Open
pretodev wants to merge 1 commit into
elias8:mainfrom
pretodev:fix/flterm-ctrl-space
Open

pretodev wants to merge 1 commit into
elias8:mainfrom
pretodev:fix/flterm-ctrl-space

Conversation

@pretodev

@pretodev pretodev commented Sep 21, 2026

Copy link
Copy Markdown

Summary

  • Space was missing from flterm's unshifted codepoint map, so Kitty keyboard encoding treated Ctrl+Space as a plain space. Neovim (and other apps that bind that chord for completion) never saw the keymap.
  • Report U+0020 for Key.space so legacy encoding emits NUL and Kitty emits CSI 32;5 u, matching Ghostty's encoder. Unmodified Space and other Ctrl chords are unchanged.

Test plan

  • flutter test --no-pub test/input/ctrl_space_test.dart test/foundation/platform_map_test.dart
  • In a terminal running Neovim with imap <C-Space> <C-x><C-o> (or the usual completion mapping), press Ctrl+Space and confirm completion opens
  • Press Space alone and confirm a normal space is inserted
  • Press Ctrl+C and confirm the interrupt/ETX still reaches the program

Space was missing from the unshifted codepoint map, so Kitty fell back
to the printable character and Neovim saw a plain space instead of the
completion mapping. Report U+0020 so legacy mode emits NUL and Kitty
emits CSI u, without changing unmodified Space or other Ctrl chords.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant