* Stage clipboard-preserving capture insertion for Paste Last on Mac
* Update Rune and its Nix source hash for the picker work
* Select the latest ready paste by owner identity and revalidate it
* Exercise a held mixed paste picker with real bundles and a private Mac pasteboard
* Publish ready Annotate identity and queue owner-specific paste requests
* Wire the existing Mac paste shortcut and controls to the opt-in mixed picker
* Recheck the selected field and cover Paste Last with a disposable Mac receiver
* Refresh the Rune revision for the unified History pane
* Unify Mac History and keep only spoken words after a deliberate dictation cancel
* History and Paste Last call a Hex capture an annotation (t1612)
A finished Hex capture is an Annotation in History, its details and the
Paste Last picker, and the type filter is Annotations. The Captures pane no
longer rewrites its own label when the unified History is on, and the search
index drops the old synonym. Scrawl stays only as Scrawl.app and the on-disk
.scrawl format; a Hex-owned format is separate file and engine work.
* Gate the unified History behind a Labs toggle and give it one row shape (t1612)
Labs › Paste Last picker (labs.paste_last_picker; macOS, Dev audience, off by
default) replaces HEX_EXPERIMENTAL_PASTE_LAST and is read where the work
starts: the picker and its gesture, History's unified list, and the cancel
path's word writer. Off, Paste Last and History behave exactly as before.
History's rows now share one shape for dictations, annotations, screenshots
and recordings; a capture's detail card carries its picture, words, facts and
actions; a search or the type filter never leaves a stale card open; an empty
History has one empty state; and the type filter shows only when there is more
than one kind to filter.
The picker's rows sit on its title's left edge.
* Show the Paste Last picker card on macOS only (t1612)
* Refresh the Labs goldens for the Paste Last picker card (t1612)
* Keep the unified History's capture helpers to macOS builds (t1612)
* Keep the unified History's fixture pictures behind the Mac capture gate (t1612)
* Point the docs at the Paste Last picker lab (t1612)
* windows: join back-to-back dictations with a space
move the input-activity revision, continuation join and its tests into a
platform-neutral continuation module. windows now invalidates it on real
keys and clicks from the low-level hooks and on foreground-window changes,
and the paster joins dictation and paste last the way macos does.
* windows: end continuations on real input and skip hex's own trigger
injected input from other tools and the auxiliary mouse buttons end a paste
continuation as on macOS, while Hex's own synthetic events and a dictation
trigger that Labs › Share shortcut lets through do not. A standalone macOS
paste clears the continuation only where dev did: at the start of typing, or
after the clipboard is preserved and checked.
* windows: a bare trigger key press ends the paste continuation
Labs › Share shortcut lets the dictation trigger's key reach the app in
front, and the hook treated every event for that key as hex's own. A
plain Space while Ctrl+Space is bound then kept the continuation, so the
next dictation joined with a space for no reason. Mark the press as the
shortcut's only once it claims the capture, and drive the hook's own
state machine in a test.
* take the microphone key at the session tap
macos matches its own dictation shortcut before the app and before hex's
annotated-session tap, so the mic key never reached the recorder or a
binding. with labs › microphone key alone on, a session tap now sees key
code 176: the press is fed to the listener when one of hex's shortcuts
matches it, and to the window's recorder while a shortcut is being
recorded; in both cases the press and its release are consumed. anything
else passes through, and with the lab off no tap exists.
the recorder reads those presses through the same ChordCapture its own
key events use, and the tap wakes the window for them.
also fixes a_lone_lab_card_keeps_half_the_row, which had no odd group left
after the microphone key card joined the grid.
* keep the key-name test with its helper
* take the recorder's watch with a question mark
* name the recorder wake and take presses without a drain
* harden the microphone key tap
takes the press from the session boundary handy-keys ships at, with a
comment citing its listener. the tap-disable notification now comes first,
ends the capture and forgets the press like the annotated tap; the instant
is read with the same recency rule as hid events; a failed send passes the
event through; the taken press is a single option, cleared when a press
passes through, when the tap is removed, and on disable. removing the tap
only cancels a capture when it holds a listener press. the screenshot
shortcuts refuse the key, since a shot reads its keys after this tap. the
recorder clears the queue it no longer reads and feeds tap presses through
the monitor's own channel.
docs hedge on whether macOS's dictation still opens; a real press is still
unobserved on hardware. adds callback tests for bound, unbound, paused,
recording, synthetic and disabled cases.
* add pause from menu bar lab (#82)
* pause: hold a resume through Caps Lock and follow the pause in the menu
The neutral-keyboard check skipped Caps Lock and a stale Fn flag, the
menu kept saying Pause Hex while a resume waited, and every listener
pass took the pause lock. Also gate Caps Lock dictation on suspended
shortcuts, refresh secure-input hotkeys at once, and correct the labs
doc's claims.
* pause: drop the unused pause and resume entry points
* more dictation shortcuts: up to four extras, each with its own mode
Labs › More dictation shortcuts (macOS) adds up to four more dictation
shortcuts beside the main one. Each saved row keeps its own binding and
activation mode, registers only while the Lab is on, and shares no key
with another active shortcut. Settings records, clears, and rebinds each
row; the listener runs every press through the same capture pipeline, so
each shortcut finishes with the mode it was pressed with.
* more dictation shortcuts: review fixes
* more dictation shortcuts: follow lone-modifier double-tap, narrow globe check
* more dictation shortcuts: doc nits
* more dictation shortcuts: rebase fixes
Moves the recorded-shortcut checks beside the rest of the shortcut text in
`control/settings/hotkeys.rs` so `control/settings.rs` stays under the
1,500-line ceiling, drops the `labs.rs` size exception now that dev moved the
Feature registry into `labs/feature.rs`, and counts Meeting notes file
alongside More dictation shortcuts in `Feature::ALL`.
* labs: caps lock dictation toggles hands-free dictation
A new macOS Shortcuts lab (labs.caps_lock_dictation, off by default) makes a physical Caps Lock press start a hands-free dictation and the next press finish it. Every press clears the system Caps Lock state so typing stays lowercase, and the key's LED shows Hex's state: solid while recording, blinking while a job transcribes or processes, off when done, cancelled, or failed. Turning the lab off or quitting clears the light and stops forcing the lock off.
Detection comes from the raw HID tracker's Caps Lock usage and the event tap's AlphaShift flag, deduplicated by arrival time. A dedicated worker owns all IOKit work (LED element writes, IOHIDSetModifierLockState, the blink timer) so neither the event tap nor the audio thread touches IOKit. The feature feeds a small light model alongside the HUD's one-consumer event channel rather than taking it over.
The Labs page mac-labs and mac-labs-link goldens are regenerated.
* suppression: group tap switches for caps lock cleanly
run_event_tap took eight arguments after the Caps Lock cancel flag, which clippy rejects. Group the three callback-visible switches into TapFlags instead of suppressing the lint.
* labs: harden caps lock dictation after review
Accept a press only when the HID Caps Lock key-down and its AlphaShift edge agree within a bounded window, so a remapped Control/Escape press never toggles and the lock-reset edge is ignored. Carry the HID press timestamp to the listener and forward presses before any IOKit work.
Keep the LED model on the listener and publish the pattern through an atomic the worker reads. The worker recreates its LED manager on the bounded refresh with an LED-page matching dictionary, so later keyboards join, and stale elements are not re-enumerated on every blink.
Only submission adds a light job and stage events for older or unknown jobs change nothing. Send JobCancelled for canceled worker jobs. Make Caps Lock starts stand down over pending double-tap gestures, and add the Hold-mode Escape exception to AGENTS.md and the docs.
* caps lock: fix macOS clippy findings
Drop the unused AtomicU64 import and borrow the capture host mutably for recording_since, which takes &mut self.
* caps lock: keep the worker handle live through shutdown
Read the JoinHandle when disabling so a timed-out worker detaches explicitly instead of triggering dead_code, and the listener never joins indefinitely.
* caps lock: match device times and own LED retains
Use IOHIDValueGetTimeStamp, scaled through the shared HID clock helper, as the press time and boundary. Match a HID press and an AlphaShift edge in either arrival order by absolute timestamp difference, keep unmatched evidence until a match, and mark Hex's own reset edges so they never enter the gate.
Give each cached LED element an owning Drop that releases exactly one device and one element retain, so multiple elements cannot over-release and clear() cannot leak. Log a missing IOHIDSystem connection, seed the tap's AlphaShift state when the lab turns on, and document the confirmation-window limit.
* caps lock: guard Annotate and fix LED keys
Skip a Caps Lock start while Annotate records while still allowing a running Caps Lock capture to finish. Use the real IOHIDKeys.h element keys (UsagePage/Usage) for the LED matching dictionary. Mark reset edges explicitly in the docs, seed/clear the AlphaShift state after a successful reset so RESETTING cannot swallow a real on-edge, and document the built-in-keyboard and light-race limits.
* caps lock: carry failure notices through the LED model and goldens
* caps lock: hand the HUD its own copy of each indicator event
* treat remapped caps lock as side-less modifier
* silence dead-code for test helper and held tracker
* check HID listen access and bound tracker startup
* require input monitoring for the HID tracker
* feat(annotate): prototype 15 s rolling replay buffer on macOS 27 (t1289)
* fix(capture): gate macOS-only replay imports and helpers on non-macOS (t1289)
* Labs: ⌘⇧4 screenshots on macOS (t1300)
* Fix the thumbnail golden's render (t1300)
* Round the thumbnail's size; list its scene in the playground (t1300)
* Keep rune_ui.rs under the size limit (t1300)
* Thumbnail goldens (t1300)
* Allow macOS-only re-exports elsewhere (t1300)
* Split the dictation shortcut state machine and tests out of suppression.rs
No behaviour change: DictationHotkey and its state move to
suppression/hotkey.rs and the module tests to suppression/tests.rs, bringing
suppression.rs under the size cap; its exception is removed.
* Format history.rs (cargo fmt --check fails on dev since #1070)
* Gate Again::finished like the Rune UI tests that use it (macOS test build fails on dev since #1070)
* Keep recovery from counting as neutral evidence; fix the Hold-mode cancel test's Escape flags
Stale-key recovery rebuilds only the held modifier flags (#1076): its
non-atomic scan must not vouch for keys whose delayed edges may still
arrive. The Hold-mode case of the cancel-shortcut test sent Escape without
the held Option, which reads as a release.
Releasing Shift off a held Shift-Option no longer reads as a fresh Option
press, nor does Caps Lock or the other Option key changing while Option is
held. Stale-key recovery now rebuilds modifier history from the sampled
keyboard, so a missed modifier release cannot hide the next real press.
* Split app_settings hotkeys, suppression's event taps, and linux input's X11 side into submodules
* Visibility for split submodules' tests
* Lower the split files' size ceilings
* Remove dictation cancel: Escape ends nothing (#786)
* Format and refresh the sound sets and commands goldens
* Release Escape before finishing in the held-capture test
Records like the dictation shortcut and pastes the transcript as heard,
skipping replacements, corrections, transformations, and rewriting. Unbound
by default; set in the Output pane, raw_dictation_hotkey, or
hex dictation start|toggle --raw. History keeps it as Raw.
Suggested by @ksajan.
* feat: chord shortcuts, including both Options together (#394)
Every shortcut is now a chord: the keys held together, each modifier key
with its side (left, right, any), plus at most one other key or mouse
button. Both sides of a modifier must go down within 80 ms. Settings store
{"keys": [...]} and old files convert once on load. macOS and Windows
match sides; the Linux recorder explains that Linux needs a key.
Requested by addisonking in #394.
* fix: clippy on dev (Linux-only NotRecording, submit_capture arguments)
* test: a recorded bare left click is refused by the CLI parser
- Linux draws while Ctrl+Alt+D is held (portal Activated/Deactivated), as Shift on the Mac; moving draws, a click pins, right-click or Ctrl+Z undoes. `hex annotate draw` stays a toggle.
- The send-to list shortcut (capture.list_hotkey, ⌥⇧L / Ctrl+Alt+Shift+V) is gone; Send to… is a capsule click beside Paste and Inspect.
- Sends attach the contact sheet and up to 8 keyframes inline as data: image parts, with no local path in the prompt, so remote OpenCode servers get everything.
- Dictation and Voice Action start nothing while Annotate records (macOS and Linux).
- Linux Paste pastes the contact sheet, then the summary, as the Mac does; the Linux capsule doesn't open suggestions by itself.
- Settings › Annotate gains How it works.
- Rename the feature Annotate wherever people see it: the pane and sidebar,
its rows in six languages, `hex annotate` (alias `hex capture`), README,
feature map, and AGENTS.md. Code and settings keep `capture`.
- Retire the `capture` experiment: compiled into every macOS and Linux build,
`capture.enabled` on by default, and a one-time migration that turns it on
for older settings and moves the send-to list off Paste Last's key. The
macOS list default is now Option-Shift-L.
- Linux drawing: Ctrl+Alt+D while Annotate records makes the ink overlay take
the pointer; a drag is ink, a click a pin, a right-click undoes. The
send-to list shortcut is bound through the portal too.
* Allow mouse button shortcuts on macOS
Support recording, persistence, global activation and balanced mouse event suppression. Add regression coverage and document the bindings.
Fixes#128
* Support mouse shortcuts on Windows and Linux X11
* Use stable certificate-backed signing for local macOS builds
---------
Co-authored-by: Dax Raad <d@ironbay.co>
* Drop Input Monitoring: Accessibility covers the shortcut taps (t496)
* Regenerate goldens without the Input Monitoring row (t496)
* Regenerate the permissions golden after merging dev (t496)
Command-Tab swallows Tab's key-up. While a Toggle or double-tap capture
was locked, the stale Tab made every finishing press log "locked with
stale tracked keys" and do nothing; the background poll that should
repair it did not in practice. The locked finishing press now takes the
same guarded resync path as an idle press (neutral keyboard after the
tracked key's press, only the binding's modifiers since, tracked keys
and other modifiers read up) and keeps the lock, so the press finishes
it.
Co-authored-by: vimtor <36263538+vimtor@users.noreply.github.com>
* Capture capsule polish: a calm top line, moves at once, quiet hints, frame thumbnail, footer
Rebased onto dev's capsule-esc commits (e2e5b1df, b298ae4b), keeping their behaviour:
Escape never undoes a send, Undo is click-only, the capsule hides when the
Undo window ends, and Elsewhere… is gone. The list shortcut's hints are gone
too (no "⌥⇧V Search").
* Capture capsule: five flows to compare after a capture (capture.capsule_flow)
list (today, default), toast, menu_bar, cursor and notch, live behind the
setting and in the playground, with a flow script for headless clips.
* Capture capsule: key hints in a rect, five guesses, shorter copy
Each hint's keys sit in one small rounded rect (tuning key_box: Filled or
Outlined), and the cursor's and notch's cards end in a "Send 1–N" hint.
The suggestions show up to five guesses, numbered 1–5. The finished
capsule drops "Copied" for the lead alone, the footer reads "Send ⏎",
"Keep esc" and "Always ⇧⏎", and status notes are shorter.
* Capture capsule: Filled keys only, no "guess", Shift saves a rule
Shift+digit or Shift+click sends and saves the site or app rule (the
checkbox row is gone); while Shift is down the footer reads "Always send
<site> to…" and the highlighted row "always". Sent reads "saved rule",
and Undo takes back the rule with the send. Reasons are plain words or
nothing.
* Capture capsule: Shift's footer names the site and the row in badges
* Capture capsule: Shift's badges are rounded rects with a globe, app, or chat icon
* Capture capsule: a rounded rect with the list's corners, cleaner Paste and Inspect icons (t56)
- Compare the neutral modifier event against each stale key's own press,
not the last key-down overall, so typing after Command-Tab no longer
blocks the next press.
- Fence only input stamped before the press, so a same-tick chord still
discards it, and keep the binding's key safe from an older delayed
release.
- Fenced edges, edges before a disabled tap, and a suspension no longer
feed the modifier history.
- Unit tests read an all-up keyboard by default, so every shortcut test
exercises the fast path.
Command-Tab swallows Tab's key-up, so Tab stayed tracked and blocked the
next Option press until stale recovery saw 100 ms of neutral keyboard. A
press inside that window was dropped silently, and the held Option then
blocked recovery for the whole hold.
A press of the binding itself now resynchronizes at once when the
keyboard reported no modifiers after every tracked key went down, only
the binding's modifiers went down since, and the tracked keys and every
other modifier read up. It fences older input. Ignored presses log their
reason and tracked key codes.
Post the breaker at HID as before, but drop it in Hex's annotated-session
key tap, after HID and session taps and NSEvent global monitors have seen
it, so the focused app never beeps at an unhandled key (non-text views, or
any view with Command held for Voice Action). Toggle waits the 40 ms chord
grace, the breaker needs exactly the shortcut's modifiers, and a press
during voice-delimited dictation is owed none.
Other apps' modifier-tap hotkeys (Raycast's Option tap) saw every Option
dictation as a tap on release. Once Hex owns a modifier-only press, post
one marked press of unassigned key code 0x44 while the modifiers are
still down, so tap detectors cancel as they do for any held chord.
- A pick taken back waits for a pick again: dismissed, the list shortcut
brings it back, and news of the send it took back settles nothing.
Too late to take back stays settled.
- Taking a send back moves that session, by id, once to the end of the
whole list. A saved rule names no runner-up, so the runner-up chip,
Action::Redirect, and CaptureCommand::Redirect are gone; fixtures are
shaped like the router's answer.
- A taken-back list folded by a click away leaves after the done hold,
still waiting for the list shortcut, and gives Escape back to the app.
A capture too late to take back doesn't wait for a pick.
- The two capture shortcuts never share a key, even while captures are
off; the list's keys go nowhere while captures are off.
- Settings adopt another writer's change into every editor without
unsaved typing, not none of them.
- Reopening a taken-back list is silent.
- A queued send that went on a retry shows no Undo; an undo the router
fails is published as too late; a rule reads "Sending to X…" until the
router says it went, and only then "Sent" and the Sent tone; the
countdown's last tick lands on the window's end.
A guess, nothing fitting, or no answer opens on up to three numbered
suggestions under "Copied", the best marked by its reason, with
"Always send <site> here" and Paste Last's "Elsewhere…" search. Nothing
sends until a pick (1-3 or a click), which goes at once with a quiet
Undo. The session tap takes only those digits (capture_host::suggesting).
The playground's whole flow picks a suggestion; its Saved rule toggle
plays the countdown.
It may be meant for the app being recorded, so the listener no longer
cancels a capture on Escape and Hex's tap lets it through while one
records. A dictation hold during a capture is still cancelled alone;
the capture shortcut's press before it records still takes Escape.
⌥⇧V by default, required and never overlapping another binding. Hex matches
it only while the capsule shows a list to open or the latest capture waits
for a pick after closing; otherwise it reaches the app in front. Paste Last
no longer doubles as the list key, the Elsewhere chip shows the new keys,
and Settings › Experiments › Scrawl and hex settings both edit it.
suppression's event_callback hands CapsuleKey::Press to the capsule on any
mouse-down while the list holds the keys, and still delivers the click to
the app and the listener. The flow closes the list when the pointer isn't on
the capsule. Replaces the 50 ms button-state poll, which could miss a quick
tap-to-click and woke the capsule 20 times a second.
take_keys(CapsuleKeys::{Picker, Route{escape}, List}) replaces begin_picking.
Routed, the Paste Last shortcut opens the list instead of pasting; the open
list takes every key press without Command or Control that isn't a Hex
shortcut, at the session tap, as CapsuleKey::{Text, Backspace, Up, Down,
Return{shift}, Digit, Escape}.
- A start that failed is reaped before Escape, the shortcut, or reconcile
read the capture as recording.
- Hosted input seeds Shift from the live modifier state at attach, so a
capture started with Shift up inks from the first stroke; buttons use the
same pure-Shift rule.
- The tap reports a key press only after suppression, and only when it
reaches the app: never Hex's shortcuts, Escape, or keys while a shortcut is
being recorded.
- The capture shortcut is checked after the suspended and programmatic
guards, and forgets a held key whose release it could not see.
The capture shortcut (default ⌥⇧S) is a third target in suppression:
a fresh press starts a capture and the next stops it. While a capture
records, the session tap also reports pointer events and Shift to
Capture::input(); Escape cancels a recording capture before any
dictation job. Settings › Experiments › Scrawl (capture builds, with
the experiment on) holds the opt-in, shortcut, Screen Recording,
transcriber, captures folder, and retention, defers to a running
Scrawl.app until "Use Hex for captures", and Hex imports Scrawl's
settings once, read-only. Every capture.* setting has a hex settings
key.