Repository navigation
Press duration per key (fixed time or hold while pressed) - #6
Merged
Merged
Conversation
Keys can hold their shortcut for a fixed time (`hold`, seconds) or as long
as the deck key is pressed (`hold_while_pressed`), e.g. for games.
- KeySender: press/release logic moved into the base class. Keys are
reference counted, so several deck keys can hold keys at once (a shared
modifier stays down until the last one lets go); release_all() on pause
and close. Backends now implement resolve/_emit (+ _sequence, _ready);
ported uinput (Linux), Quartz (macOS: every event carries the modifiers
held right now) and SendInput (Windows).
- DeckController: fixed holds run in their own thread, so they don't block
other keys; hold-while-pressed follows the deck key's up event.
- Editor: "Key press" setting; keys show a small corner badge
("0.8 s" / "hold"), translated (German catalog updated).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Keys can now hold their shortcut longer than a short tap – useful in games:
hold = 0.8(seconds, up to 60) – pressed for 0.8 s however briefly the deck key is touched.hold_while_pressed = true– the shortcut stays down as long as the deck key is held (sprint, aim, push to talk …).Editor: new Key press setting in the key panel. Keys with a non-default press show a small corner badge (
0.8 s/hold). Texts are translated; the decimal separator comes from the catalog (German:0,8 s).How
KeySenderbase class now owns pressing/releasing; backends only implementresolveand_emit(optionally_sequence,_ready). Keys are reference counted, so several deck keys can hold keys at the same time and a shared modifier (e.g. Shift) stays down until the last key lets go.release_all()on pause and close.DeckController: short taps stay in the ordered queue; fixed holds run in their own thread so they don't block other keys; hold-while-pressed is released on the deck key's up event, even after a profile switch, and on pause.holdvalues are reported like invalid shortcuts (profile + key in the message, red key in the editor).Tested
ruff, full test suite (84 passed),i18n.py check. New tests cover tap order, fixed hold duration, press/release, shared modifiers,release_all, config validation, the badge in EN/DE, and – throughDeckControllerwith a fake device – hold-while-pressed, a fixed hold not blocking other keys, and pause releasing held keys. Editor checked offscreen in English and German (set mode, save, reload).🤖 Generated with Claude Code