Skip to content

Windows: dictation defaults to Left Alt alone - #2292

Open
thdxr wants to merge 10 commits into
devfrom
windows-right-alt-default
Open

thdxr wants to merge 10 commits into
devfrom
windows-right-alt-default

Conversation

@thdxr

@thdxr thdxr commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Windows dictation now defaults to the left Alt key alone, held like Option on a Mac, instead of Ctrl+Space. It is the key under your thumb where Option sits on a Mac.

Why left, not either or right: Windows sends AltGr as a synthesized Left Ctrl followed by Right Alt. An either-side or right-side Alt binding matches that masked read, so every AltGr character would start a capture and cancel it when the character joined. Naming the left side leaves AltGr typing (@, €) alone. Right Alt alone is still bindable by hand (#508).

What changes

  • HotkeyBinding::default and WindowsHotkey::default store the left Option side with no key. Existing settings keep their saved dictation_hotkey (it is always serialized), so only new installs and Reset get the default.
  • macOS (Option) and Linux (Alt+Space / Ctrl+Alt+Space) are unchanged.
  • A modifier the shortcut does not name joining a modifier-only hold is now a chord like any key (src/windows/input/modifier_chord.rs): the hold cancels instead of finishing and transcribing, a Toggle press locks nothing, and the modifier's release goes to the app. This applies to every modifier-only shortcut, not only the default. Labs › Hold through other keys still keeps a hold a second or more old.
  • On new installs with the default, an Alt tap no longer opens Windows' menus or Office KeyTips, because Alt's release is masked (VK 0xE8, then the release replayed). Two Alt taps within 300 ms lock a dictation. Alt+Tab, Alt+F4, and Alt+Shift produce a start → cancel pair and reach the app. When Hex swallows a key of the chord (Paste Last's Ctrl+Alt+V takes the V), the mask comes back, so the app never reads a lone Alt tap.

Tests and site

  • The Windows suite gains default_binding_is_left_alt_alone, modifier-chord tests in src/windows/input/tests/chords.rs, and CRLF normalization in the bundled-skill and Swift-instructions tests, because a Windows checkout writes include_str! files with CRLF.
  • The rune playground test steps two stories down to Toggle cancel: the first story's Left Option shortcut now equals the new default on Windows, so it no longer changes the state the test compares.
  • The site's hero copy, keycap legend (option, alt, alt + space), and shatter texture follow the selected OS tab. The label sits on the dish's bottom row when there is no glyph to hold it down; the Mac keycap is unchanged.

Refs #2278

@thdxr
thdxr force-pushed the windows-right-alt-default branch 2 times, most recently from 5122367 to de5729a Compare November 22, 2026 00:42
thdxr and others added 10 commits November 21, 2026 20:12
Alt sits under the thumb where Option does on a Mac, so holding it to
dictate stops straining the pinky for Ctrl+Space (#2278).

The left Alt only: Windows sends AltGr as a synthesized Left Ctrl plus
the Right Alt, so an either-side Alt would press on every AltGr character,
start a capture, and cancel it when the character joined. A saved
shortcut stays as saved; there is no migration.

The site's hero key and its "Hold …" line follow the selected install tab
(Option, Alt, Alt+Space), and its keycap names that key.
The playground list test compared the first story to the second through the dictation shortcut, which is now the left Alt on Windows, the same binding the Left Option shortcut story sets; it steps to the third story (Toggle cancel) instead. The bundled skill and the Swift instructions tests normalize CRLF, which a Windows checkout writes into include_str!.
A modifier-only hold (Left Alt by default) treated Shift, Ctrl, Win, or
the other Alt going down as its release: Hold finished and pasted,
Toggle locked a recording, and Left Alt+Shift injected the 0xE8 mask key
before Alt's release, breaking Windows' input-language switch.

It is a chord like any key now: the press cancels (Labs › Hold through
other keys keeps a hold a second or more old), Toggle locks nothing, and
Alt's release is the app's, so Ctrl+Alt+V still fires Paste Last. A
modifier the chord names is part of it, whichever order the keys go down
in. The modifier-event policy moved to input/modifier_chord.rs, and the
new tests to input/tests/chords.rs, so input.rs stays under its cap.
The animation's shattering keycap was always the Mac's option key. It
takes the same lowercase legend the hero keycap shows now: option with
the glyph, alt, or alt + space.
A modifier joining a Left Alt hold leaves Alt's release to the app, but only when Hex swallowed nothing. Paste Last's V is Hex's key, so the mask comes back and the app never reads a lone Alt tap. Say so in windows.md and the feature map, and name the test that holds it.
With the Mac's glyph omitted on Windows and Linux, the label was the dish's only child and space-between put it at the top, while the canvas shatter draws the legend at the bottom. An auto top margin keeps both in the same place; the Mac's glyph and label are unchanged.
@thdxr
thdxr force-pushed the windows-right-alt-default branch from de5729a to 6c13c7a Compare November 22, 2026 01:16
@thdxr thdxr changed the title Windows: dictation defaults to Right Alt alone Windows: dictation defaults to Left Alt alone Nov 22, 2026

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