Skip to content

feat(hotkey): cancel the recording when the hotkey becomes a shortcut - #835

Open
someonewithpc wants to merge 1 commit into
peteonrails:devfrom
someonewithpc:feat/cancel-on-other-key
Open

someonewithpc wants to merge 1 commit into
peteonrails:devfrom
someonewithpc:feat/cancel-on-other-key

Conversation

@someonewithpc

Copy link
Copy Markdown

Description

With a modifier as the hotkey (key = "RIGHTCTRL"), every Right Ctrl+C or Right Ctrl+Tab also starts a recording. Short ones are discarded, but a quick run of shortcuts, or one held a little long, dictates whatever was said meanwhile

hotkey.cancel_on_other_key = true cancels the recording when any other key goes down while the hotkey is held. Modifiers, model_modifier and the profile_modifiers keys are exempt, since they're meant to be pressed with the hotkey. Off by default

Related Issue

#834

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

  • I have tested these changes locally
  • I have run cargo test and all tests pass
  • I have run cargo clippy -- -D warnings with no warnings
  • I have run cargo fmt

Documentation

  • I have updated documentation as needed
  • No documentation changes are needed

Pre-merge checklist

  • This PR targets the dev branch (not main)
  • Wait for ci-success to pass before marking Ready for Review (draft mode is encouraged while CI is red)

Additional Notes

Running an always-on version daily on 1.1.1-rc5. Unit test for which keys count as a shortcut; docs in docs/CONFIGURATION.md and config/default.toml

If the language-modifier PR lands too, its keys should be exempt as well. I'll rebase whichever goes second

With a modifier as the hotkey, e.g. key = "RIGHTCTRL", every Right
Ctrl+C or Right Ctrl+Tab also starts a recording. Short ones get
discarded, but a long shortcut or a quick sequence of them dictates
whatever was said meanwhile, or pastes it into the wrong place.

hotkey.cancel_on_other_key cancels the recording when another key goes
down while the hotkey is held. Modifiers, model_modifier and the
profile_modifiers keys are exempt, since they're meant to be pressed
with the hotkey. Off by default.
@someonewithpc

Copy link
Copy Markdown
Author

CI runs correctly locally. Can a maintainer approve the CI workflow?

Apologies if I misunderstood the workflow

@someonewithpc
someonewithpc marked this pull request as ready for review October 5, 2026 16:52

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