mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Merge 0c7686230d
into 77dafb819f
This commit is contained in:
commit
5225d5e081
@ -2344,6 +2344,7 @@ impl FromStr for Key {
|
|||||||
modifiers |= Modifiers::SUPER;
|
modifiers |= Modifiers::SUPER;
|
||||||
} else if part.eq_ignore_ascii_case("iso_level3_shift")
|
} else if part.eq_ignore_ascii_case("iso_level3_shift")
|
||||||
|| part.eq_ignore_ascii_case("mod5")
|
|| part.eq_ignore_ascii_case("mod5")
|
||||||
|
|| part.eq_ignore_ascii_case("altgr")
|
||||||
{
|
{
|
||||||
modifiers |= Modifiers::ISO_LEVEL3_SHIFT;
|
modifiers |= Modifiers::ISO_LEVEL3_SHIFT;
|
||||||
} else {
|
} else {
|
||||||
@ -3048,21 +3049,16 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_iso_level3_shift() {
|
fn parse_iso_level3_shift() {
|
||||||
|
for input in ["ISO_Level3_Shift+A", "Mod5+A", "AltGr+A"] {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
"ISO_Level3_Shift+A".parse::<Key>().unwrap(),
|
input.parse::<Key>().unwrap(),
|
||||||
Key {
|
|
||||||
trigger: Trigger::Keysym(Keysym::a),
|
|
||||||
modifiers: Modifiers::ISO_LEVEL3_SHIFT
|
|
||||||
},
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
"Mod5+A".parse::<Key>().unwrap(),
|
|
||||||
Key {
|
Key {
|
||||||
trigger: Trigger::Keysym(Keysym::a),
|
trigger: Trigger::Keysym(Keysym::a),
|
||||||
modifiers: Modifiers::ISO_LEVEL3_SHIFT
|
modifiers: Modifiers::ISO_LEVEL3_SHIFT
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn default_repeat_params() {
|
fn default_repeat_params() {
|
||||||
|
Loading…
Reference in New Issue
Block a user