Add PTT debounce for mouse button support#114
Merged
Aaronontheweb merged 1 commit intomasterfrom Jan 23, 2026
Merged
Conversation
Users mapping mouse side buttons to the PTT key (F9) get rapid key up/down events instead of proper press/release behavior. This caused multiple tiny recordings instead of one continuous recording. Changes: - Add configurable debounce delay (default 30ms) via hotkeys.ptt_debounce_ms - When key is released, schedule stop after debounce delay - If key is pressed again before delay expires, cancel the pending stop - This allows using mouse buttons for push-to-talk effectively The debounce can be disabled by setting ptt_debounce_ms to 0 in config.
a21b890 to
28eee40
Compare
Aaronontheweb
added a commit
that referenced
this pull request
Jan 23, 2026
Aaronontheweb
added a commit
that referenced
this pull request
Jan 23, 2026
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.
Summary
Adds debounce support for push-to-talk to work with mouse buttons that send rapid key events.
Problem (#95)
Users mapping mouse side buttons to the PTT key (F9) get rapid key up/down events instead of proper press/release behavior. The mouse software sends a continuous stream of
key down → key up → key down → ...while the button is held. This caused multiple tiny recordings instead of one continuous recording.Solution
hotkeys.ptt_debounce_msconfig optionConfiguration
Closes #95
Test plan
ptt_debounce_ms: 0- should have no debounce (immediate stop)pytest tests/ --ignore=tests/test_sleep_monitoring.py