Skip to content

Copilot key as dictation hotkey - #19

Open
kijan007 wants to merge 5 commits into
winidi:mainfrom
kijan007:feat/copilot-key
Open

kijan007 wants to merge 5 commits into
winidi:mainfrom
kijan007:feat/copilot-key

Conversation

@kijan007

Copy link
Copy Markdown

The Microsoft Copilot key exists in two firmware flavours and neither was usable as a hotkey:

  • Standards-compliant keyboards (kernel >= 6.6) send KEY_ASSISTANT (0x247). It is now mapped to a single "copilot" sentinel.
  • HP laptops (verified on a ZBook Ultra G1a) send no KEY_ASSISTANT at all: the key is a firmware macro pressing left-Meta, left-Shift and F23. Those three events are folded back into one Copilot press and release. The release is mirrored from an open-fold flag rather than re-testing the held modifier set, because HP does not guarantee that F23 comes up before Super/Shift; would otherwise leave the app stuck recording. Bare F23 is dropped so it can never be mistaken for the hotkey.

Also fixes a take being cancelled mid-dictation: the Copilot macro's own Super/Shift presses, and plain mouse clicks, arrived as "another key" and aborted the recording. Those are now tolerated; a genuine Ctrl+C or letter key still cancels as before.

dictate.py (the headless CLI) keeps its own stale KEY_MAP without copilot — pre-existing, left as is.

kijan007 and others added 3 commits November 13, 2026 17:50
The Microsoft Copilot key exists in two firmware flavours and neither
was usable as a hotkey:

- Standards-compliant keyboards (kernel >= 6.6) send KEY_ASSISTANT
  (0x247). It is now mapped to a single "copilot" sentinel.
- HP laptops (verified on a ZBook Ultra G1a) send no KEY_ASSISTANT at
  all: the key is a firmware macro pressing left-Meta, left-Shift and
  F23. Those three events are folded back into one Copilot press and
  release. The release is mirrored from an open-fold flag rather than
  re-testing the held modifier set, because HP does not guarantee that
  F23 comes up before Super/Shift; would otherwise leave the app stuck
  recording. Bare F23 is dropped so it can never be mistaken for the
  hotkey.

Also fixes a take being cancelled mid-dictation: the Copilot macro's
own Super/Shift presses, and plain mouse clicks, arrived as "another
key" and aborted the recording. Those are now tolerated; a genuine
Ctrl+C or letter key still cancels as before.

dictate.py (the headless CLI) keeps its own stale KEY_MAP without
copilot — pre-existing, left as is.
wtype is tried first on Wayland (layout-correct on KDE/wlroots). On GNOME,
where wtype is unsupported, ydotool sends US key positions and breaks QWERTZ.
When GNOME's active input source is 'ch', type via ydotool using Swiss German
key positions taken from the XKB symbols file.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
- Tray icon, window icon and window title now carry the state (ready,
  recording, transcribing, error) via the mic colour
- Minimising hides the window instead of parking it in the taskbar, so the
  tray icon stays visible and shows the status
- Dark Windows taskbar keeps using light icon variants
The near-black microphone (#2b2b2b) disappeared on dark shells and panels.
"Ready" is now a mid grey (#82868b) that keeps a contrast of at least 3:1
against both a light (#f0f0f0) and a dark (#2b2b2b) background.

The tray microphone and the status dot on the app icon now have separate
palettes, because they sit on different backgrounds: the dot always lies
on the blue/violet logo square and therefore needs vivid colours, while
the free-standing tray glyph has to work on any panel.
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