-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Latches break existig latches of the latching key's type modifiers
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. 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. This ensures the correct behavior when combining sticky keys with `ISO_Level5_Latch` or latched-group additional symbols layers. Signed-off-by: Jules Bertholet <[email protected]>
- Loading branch information
1 parent
1600066
commit 801c873
Showing
4 changed files
with
132 additions
and
3 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
changes/api/+latches-sometimes-break-other-latches.breaking.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Changed latching behavior so that latching a modifier or group 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. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
default partial alphanumeric_keys | ||
xkb_symbols "base" { | ||
name[Group1] = "Test latching behavior"; | ||
|
||
key <AE01> { [ 1, exclam, NoSymbol, NoSymbol, plus ], type[Group1]="CTRL+ALT"}; | ||
|
||
key <AD01> { [ q, Q ], type[Group1] = "ALPHABETIC" }; | ||
|
||
key <CAPS> { [ Caps_Lock ] }; | ||
|
||
key <LFSH> { | ||
symbols[Group1] = [ Shift_L, Caps_Lock ], | ||
actions[Group1] = [ LatchMods(modifiers=Shift), LockMods(modifiers=Lock) ] | ||
}; | ||
|
||
key <LCTL> { | ||
symbols[Group1] = [ Control_L ], | ||
actions[Group1] = [ LatchMods(modifiers=Control) ] | ||
}; | ||
|
||
key <LALT> { | ||
symbols[Group1] = [ Alt_L ], | ||
actions[Group1] = [ LatchMods(modifiers=Alt) ] | ||
}; | ||
|
||
key <RTSH> { | ||
symbols[Group1] = [ Shift_R, Shift_R, Shift_R, Shift_R, Shift_R ], | ||
actions[Group1] = [ LatchMods(modifiers=Lock), LatchMods(modifiers=Lock), LatchMods(modifiers=Lock), LatchMods(modifiers=Lock), LatchMods(modifiers=Lock) ], | ||
type[Group1]="CTRL+ALT" | ||
}; | ||
}; |
This file contains 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