Repository navigation
feat(core,daemon,app): a key as the dial modifier, held or toggled (#189) - #207
Merged
Merged
Conversation
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.com>
Signed-off-by: Jade (q-horde) <bot@qubernetic.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.
Summary
Slice 9 of the beta epic #180 (plan QUB-633, revision 2). A key can take the Dialpad's dial and roller over:
modifier = "held"while the key is held, ormodifier = "toggle"from a short press until the next press of any key, a Dialpad button, a page or profile change, a reload that drops the key, the lock or[timing].modifier_timeout. The key shows a ring and a dial badge for the whole active time, on the pad and in the app.Closes #189
Changes
profile.rs,schemas/profile.schema.json): a key'smodifier(helddefault,toggle),dialandrollertables with the[dialpad]fields;modifierwithout a table is a load error at the key's table (fixturemodifier-without-binding.toml).state.rs,config.rs,schemas/config.schema.json): the held set (last pressed wins, a used mark), the armed toggle and its end rules (same key at its press, any other key, a Dialpad button, a page change, a profile switch, a reload that drops the key, the lock,modifier_timeout, default 0),KeyDown/KeyPressdecisions for the caller's press detector,modifier_turn(the active key, else the held one before it that binds the roller), the page return held while a modifier is active; the view carriesmodifier: { key, mode }.socket.rs,trace.rs,dialpad.rs, fixtures): themodifierevent and class, the tracemodifierfield, themodifierresult (active),presswithholdorrelease;dialpad::modifier_turnresolves a turn on the key's binding with its step and carry.feedback.rs,render.rs): themodifierlook, an accent ring and acircle-gaugebadge top left (a key's own badge stays top right); snapshotsrender__looks__modifier*.snap.png.edit.rs,recipe.rs):KeyFieldsround-tripsmodifier,dial,roller(inline tables,step1 left out, an empty table kept); a recipe keeps them.engine.rs,daemon.rs,exec.rs): held keys skip the long-press detector and fireshortat a release without a turn; toggle presses arm or end; turns route to the key's binding; the look on the key; the timeout wake;hold/releasefrom the socket;KEYVO_KEYandKEYVO_CONTROLboth for a modifier turn'sexec.modifierevent; actl presstest forholdandrelease.RotaryFields.svelte, shared with the control editor), the mirror's ring and badge, the Dialpad panel's(held)/(toggled)labels, the mock (reads the fields, gives the dial to key 7 then key 8 on a timer).modifier_timeoutrow), §6.3, §7.2, §8, §9, §10, changelog;docs/socket-api.md;CONTEXT.md(Modifier key, Toggle, Trace, View);docs/design/gui-ux.md§3.1 and §3.3;docs/beta-test.mdblock feat(core,daemon,app): a key as the dial modifier, held or toggled (#189) #207; roadmap row 9;CLAUDE.md;docs/pre-alpha-test.mdVS Code key numbers.Automated checks
just fmt-checkjust lint(clippy-D warnings)just test(818 passed, 1 skipped)just deny(advisories, bans, licenses, sources ok)just app-test(svelte-check 0 errors, vitest 2656 passed, audit at high clean, app deny ok)User test
Owner, host, both devices, the example profiles with the held Brightness key 7 and the toggled Zoom key 8 (
docs/beta-test.md, section 5, block #207).Brightness (held)on the dial; release: nothing else happens, the ring goes, the dial is back on volume.longaction, the short action runs once at the release.Zoom (toggled); tap key 8 again: the ring goes, the dial is back on volume.config.tomlwith[timing] modifier_timeout = 5000: tap key 8, wait six seconds: the ring goes by itself; remove the file.vscode.tomlwithout adialtable: under VS Code key 8 is an ordinary key again.bin/keyvo ctl press '{"key":7,"hold":true}', turn,'{"key":7,"release":true}'; then'{"key":8}', turn,'{"key":8}': the same routing, themodifierevents visible inctl subscribe.stepto 4: the dial zooms every fourth detent.Notes for reviewer
keyvo_core::state(tests incrates/keyvo-core/tests/state.rs); the key press detector stays in the controller as in feat(core,daemon,app): dialpad bindings and the dialpad panel #188, andState::key_down/key_up/key_presstell it whether a key is held (no long press) and what a press does.dry_runhold, release or toggle press answers withmodifierset anddry_run, and changes nothing, so the app's simulator cannot arm the real pad. The app's mock therefore cycles the modifier on a timer instead of on a press.Daemoninterface has nohold/release(the Tauripresscommand takes a key and a kind);ctl statusprints the view'smodifieras part of the raw JSON, no extra formatting.5d6a98dholds the socketpressfields, themodifierresult and the daemon together: theCommand::Pressfields do not compile without their controller arm.1eb8eeewas committed with one client test red (the mirror's trace capacity), fixed in92988dd.