Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes and improvements to latching behavior #569

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Changed latching behavior so that latching a modifier or group now breaks existing modifier latches,
but only if the type of the key responsible for the latter latch
has the modifier of the pre-existing latch in its modifiers list,
and did not `preserve` the modifier.

For example, if a new latch is triggered by pressing a key of type `ALPHABETIC`,
existing `Shift` and `Lock` latches will now be broken, but other latches
will be preserved as before.
4 changes: 4 additions & 0 deletions changes/api/+locks-break-latches.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Changed modifier and group latches so that setting or releasing a lock now breaks them.
(This includes setting a lock via `latchToLock`, or clearing it via `clearLocks`.)
This enables implementing a key that, for example, latches `Shift`
when pressed once, but locks `Caps` when pressed twice in succession.
7 changes: 7 additions & 0 deletions changes/api/+multiple-simultaneous-latches.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Changed latching behavior so that the same rules used to detect
whether an action breaks a latch after the latching key is released,
are now also used to detect whether the action prevents the latch
from forming before the latching key is released.

The major effect of this change is that depressing and releasing
two latching keys simultaneously will now activate both latches.
Loading
Loading