Skip to content

Say once when a macOS terminal types Option instead of alt - #1097

Open
lezli01 wants to merge 1 commit into
tui-auditfrom
fix/macos-option-keys
Open

lezli01 wants to merge 1 commit into
tui-auditfrom
fix/macos-option-keys

Conversation

@lezli01

@lezli01 lezli01 commented Nov 23, 2026

Copy link
Copy Markdown
Owner

Closes #1061 (last item in #1084's suggested order). Merges into tui-audit.

The note

  • On macOS, when the chat composer receives the character that Option+letter types on the US layout (∂ for Option+d, ß for Option+s, …), it can show a note.
  • It does so only for a letter whose alt+ chord the chat actually binds. A glyph whose chord does nothing in the chat is just a character.
  • It says it once per run, on the chat's note line: Option+d typed ∂, so alt+d never arrives. Set Terminal's "Use Option as Meta key" or iTerm2's Option key to "Esc+"; meanwhile ctrl+p reaches every command.
  • The character is still typed: it may be meant.
  • Dead keys (e, i, n, u, `) type nothing on their own, so they are not detected.

The guide

The chat workspace section now opens with this once, with where each setting lives. The composer table's alt+enter row points back to it.

Keyboard enhancements (considered, not requested)

Bubble Tea v2 already negotiates the kitty keyboard protocol through the view where a terminal supports it. Whether Option is a modifier or a character is still the terminal's own setting under that protocol, and Terminal.app does not speak it at all. So requesting enhancements would not fix this case. This conclusion comes from reading, not from a run on a real terminal.

Checks

  • Unit tests: macOS only; a single lone glyph; once per run; only for bound chords, checked against the registry. They take the OS as a parameter, so they run on every CI leg.
  • go test ./internal/tui passes and mage lintall is clean.

When the chat composer receives the character a US-layout Option press
produces for a letter whose alt chord the chat binds (Option+d's ∂), it
says once per run that the terminal sends Option as a character, names
Terminal's "Use Option as Meta key" and iTerm2's "Esc+", and points at
ctrl+p. The character is still typed. The guide's chat section says it
once, up front.

Closes #1061

This branch has not been deployed

No deployments
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