forked from xkbcommon/libxkbcommon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
state: Fix mods not being independently cleared
The modifiers filters should ensure minimal interaction between them, but currently the Latch mod filters are overzealous and mess with the mods from other filters set to be cleared, resulting in some modifiers permanently set. Fixed by clearing mods properly with `OR` rather than direct setting of `state::clear_mods`. While we are at it, `state::set_mods` should be `OR`ed as well. This should not have any impact for now, but this is more future-proof. Fixes xkbcommon#583 Co-authored-by: Jules Bertholet <[email protected]> Co-authored-by: Pierre Le Marre <[email protected]>
- Loading branch information
1 parent
dfa286b
commit d6a715b
Showing
4 changed files
with
101 additions
and
7 deletions.
There are no files selected for viewing
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 @@ | ||
Fixed modifiers not properly unset when multiple latches are used simultaneously. |
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,16 @@ | ||
default partial alphanumeric_keys | ||
xkb_symbols "base" { | ||
name[Group1] = "Test issue #583"; | ||
|
||
key <AB01> { [ z, Z, y, Y, ezh, EZH, ydiaeresis, Ydiaeresis ], type[Group1] = "EIGHT_LEVEL" }; | ||
key <AB02> { [ x, X ], type[Group1] = "PC_CONTROL_LEVEL2" }; | ||
|
||
key <RALT> { [ ISO_Level3_Latch, ISO_Level5_Latch ], type[Group1] = "PC_CONTROL_LEVEL2" }; | ||
key <RCTL> { [ Control_R ], [LatchMods(modifiers=Control)] }; | ||
key <LWIN> { [ ISO_Level3_Latch ], type[Group1] = "ONE_LEVEL" }; | ||
key <RWIN> { [ ISO_Level5_Latch ], type[Group1] = "ONE_LEVEL" }; | ||
|
||
modifier_map None { <RALT> }; | ||
modifier_map Mod3 { <RWIN> }; | ||
modifier_map Mod5 { <LWIN> }; | ||
}; |
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