Repository navigation
TD-5224: a system-wide stop shortcut for computer use (engage only) - #110
Merged
Merged
Conversation
captcrock
force-pushed
the
td/5224-stop-hotkey
branch
from
November 2, 2026 21:02
b37d9f3 to
ddb7029
Compare
Cmd+. / Ctrl+. only works while TST Desk is the front window, and during computer use the agent is usually in another app. The app now registers a global shortcut, default Ctrl+Alt+Super+Period (Ctrl+Opt+Cmd+. on macOS), that creates the same machine-wide stop-file as the title-bar Stop (TD-5223), so every computer-use client halts. It only engages. An agent can press key combos, so a toggle would let it switch itself back on; resume stays a click in TST Desk. It does not take Cmd+. system-wide, since many apps use that for Cancel. The combo is computer_use.stop_shortcut (empty turns it off), read at launch. The app writes the file itself, so the shortcut works while the daemon is busy; the daemon's check then updates every window. The global-shortcut plugin is now built once and each shortcut registers its own handler, so quick entry (macOS) and the stop shortcut share it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
captcrock
force-pushed
the
td/5224-stop-hotkey
branch
from
November 2, 2026 21:04
ddb7029 to
c6f42bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #109 (TD-5223). This PR targets
td/5223-stop-file. Once #109 merges, retarget it tomain.What
A system-wide shortcut that stops computer use on the whole machine, even while TST Desk is in the background. ⌘. / Ctrl+. only works when TST Desk is the front window, and during computer use the agent is usually in another app.
Ctrl+Alt+Super+Period(⌃⌥⌘. on macOS), set bycomputer_use.stop_shortcut; empty turns it off. Read at launch. It doesn't take ⌘. system-wide, since many apps use that for Cancel; the in-window ⌘. is unchanged.lib.rs, and each shortcut registers its own handler (on_shortcut). Quick entry (macOS) moved to that too; before, it built the plugin with a single handler.config.yaml, Settings help text,docs/configuration.md(plus a short section on the machine-wide Stop), DECISIONS (2026-11-02, TD-5224) and backlog (TD-5224).Tests (each shown to fail when its piece is broken)
stop_hotkey(6): unset → default; a custom combo; empty → off; the default parses to Ctrl+Alt+Super+. and is not ⌘.; pressing creates the stop-file at the resolved path (default, andkillswitch.stop_filefrom the tst-cu-mcp config); pressing again while stopped keeps it stopped. Mutations checked: turning engage into a toggle, defaulting toSuper+Period, and ignoring "empty is off" each fail a test.test_stop_shortcut_config.py(4): model default, shipped config, empty/custom values, docs row.Suites (Linux)
mypy --strict tstdcleancargo test --lib131 passed;cargo clippy --all-targets -D warningscleanDarwinBackend.hit_testnested in_mark_prompted, other in-flight work)Not verified here
quick_entry.rs. That code is macOS-only and CI builds on Linux. It now calls the sameon_shortcutAPI the stop shortcut uses (which builds and runs here), but the Mac build is the real check.🤖 Generated with Claude Code