You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(osm): add configurable quick_release option for one-shot modifiers
Add `quick_release` boolean to `OneShotModifiersConfig` (default false,
preserving existing chain-mode behavior). When enabled, OSM releases on
the next key press instead of release, equivalent to ZMK's `&skq`.
Key changes:
- oneshot.rs: update_osm checks quick_release to decide release timing
- keyboard.rs: send follow-up report after OSM clear in quick-release
mode to stop host from repeating the modified key
- Fix combo interaction: reset_sub_combos replaces reset_combo to avoid
premature OSM clearing from buffered combo constituent keys
- Config pipeline: quick_release field threaded tesolved config, and codegen
- Tests: cover both quick-release and chain-mode behaviors, including
combo interactions
Configuration example (keyboard.toml):
[behavior.one_shot_modifiers]
quick_release = true
Copy file name to clipboardExpand all lines: docs/docs/main/docs/configuration/behavior.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,10 +52,16 @@ This behavior is also known as One-Shot Sticky Modifiers (OSSM).
52
52
53
53
If you press One-Shot Modifier again, it will be sent as a normal modifier key press and, therefore, released.
54
54
55
+
The `quick_release` option controls when the one-shot modifier is released:
56
+
57
+
-`false` (default): the modifier is released when the next key is **released** (chain mode, equivalent to ZMK `&skn`). The modifier stays active for the entire duration of the next keypress, including key repeat.
58
+
-`true`: the modifier is released when the next key is **pressed** (equivalent to ZMK `&skq`). Only the initial press of the next key is modified; key repeat will not include the modifier.
59
+
55
60
Default values:
56
61
```toml
57
62
[behavior.one_shot_modifiers]
58
63
activate_on_keypress = false
64
+
quick_release = false
59
65
```
60
66
61
67
OSSM example:
@@ -64,6 +70,12 @@ OSSM example:
64
70
activate_on_keypress = true
65
71
```
66
72
73
+
Quick-release example:
74
+
```toml
75
+
[behavior.one_shot_modifiers]
76
+
quick_release = true
77
+
```
78
+
67
79
## Combo
68
80
69
81
In the `combo` sub-table, you can configure the keyboard's combo key functionality. Combo allows you to define a group of keys that, when pressed simultaneously, will trigger a specific output action.
0 commit comments