Skip to content

feat: add opt-in always-toggle shortcut alongside push-to-talk - #1877

Open
ljden wants to merge 1 commit into
cjpais:mainfrom
ljden:feat/dual-shortcut-toggle-mode
Open

feat: add opt-in always-toggle shortcut alongside push-to-talk#1877
ljden wants to merge 1 commit into
cjpais:mainfrom
ljden:feat/dual-shortcut-toggle-mode

Conversation

@ljden

@ljden ljden commented Aug 8, 2026

Copy link
Copy Markdown

Before Submitting This PR

Please confirm you have done the following:

Human Written Description

I just downloaded Handy today and after using it for a few hours it was the first feature I noticed that was missing.
There's definitely times where I want to be able to just quickly pop something in and other times where a longer bit of text is needed and therefore having the ability to do both is good.

The main thing that I didn't do here that I would have preferred to do is to change the push-to-talk pill control from the current toggle | PTT behaviour, to instead be disabled | enabled, with the separate control for the toggle feature.
The one other thing that I didn't do was make the default binding as unset - as it seems like that's not currently supported. That becomes more useful with the independent controls.

I did see the discussion early in the year around the fact that you weren't sure about adding this at the time, so fair enough if you want to reject it!

Related Issues/Discussions

Related to #147 — implements the two-shortcut variant proposed in the comments
(a separate toggle shortcut alongside push-to-talk), rather than the
press-vs-hold hybrid in the original post.

Design decisions worth flagging:

  • Opt-in and off by default: a new transcribe_toggle_enabled setting gates
    registration exactly the way post_process_enabled gates the post-process
    shortcut, so existing users see zero change (the frozen v0.9 settings-store
    test still passes; the new field is #[serde(default)], no migration).
  • With Push To Talk off, the main transcribe shortcut already toggles, so
    enabling this one is redundant (though harmless). It is deliberately not
    gated on push_to_talk — that would couple registration to two settings and
    create hidden-active-shortcut edge cases for a cosmetic gain. Happy to add
    that gating as a follow-up if preferred; per-binding modes seem better left
    to the keyboard rewrite mentioned in Auto push to talk and command line options #147.
  • The Cancel shortcut row is now shown whenever any shortcut can start a
    toggle-mode recording (previously hidden whenever Push To Talk was on).

Community Feedback

In #147, @cjpais said "I like the feature you're describing", and @codepunkt /
@samleibowitz specifically asked for "defining two shortcuts, one for push to
talk and one for toggle" — which is what this PR adds.

Testing

  • cargo check, cargo clippy, cargo fmt --check clean (no new warnings)
  • cargo test: 177 passed, including the frozen v0.9 settings-store
    compatibility test
  • bun run lint, tsc, prettier --check, vite build all pass
  • Manual on macOS: tested with new toggle both enabled and disables to confirm correct behaviour. Also tested both states of PTT with the new explicit toggle key combo.
image image

AI Assistance

  • No AI was used in this PR
  • AI was used (please describe below)

If AI was used:

  • Tools used: Claude Code (Sonnet 5 wrote the initial implementation; Fable 5 reviewed and reworked it)
  • How extensively: code and commit message AI-written under human direction; human reviewed the diff, ran all
    checks, and manually tested the feature

Adds a "Toggle Recording" shortcut (transcribe_toggle) that always operates
in toggle mode — press to start, press again to stop and transcribe —
independent of the global push_to_talk setting, so one key can stay
push-to-talk while another starts hands-free sessions.

Off by default: a new transcribe_toggle_enabled setting gates registration
everywhere transcribe_with_post_process gates on post_process_enabled, so
nothing changes for existing users until they enable it in General settings.
The Cancel shortcut row now shows whenever any shortcut can start a
toggle-mode recording.

Design note: the toggle shortcut only makes sense as a companion to
push-to-talk — with push_to_talk off, the main transcribe shortcut already
toggles. Its switch is therefore only shown while push-to-talk is on, and
turning push-to-talk off disables (and unregisters) the toggle shortcut
outright rather than suspending it, so the enabled flag always means what
it says. Per-binding modes are deferred to the planned keyboard rewrite
(cjpais#147).

Only the English translation strings were added.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@adamkdean

Copy link
Copy Markdown

Cross-posting for visibility: #1878 (comment)

My preference would be that we have one hot key, and it's 200-300ms key up/down for toggle, or longer for PTT. This would be the best UX.

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.

2 participants