mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Merge 0c7686230d
into 08a8a0f29a
This commit is contained in:
commit
2e20db4577
@ -2383,6 +2383,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 {
|
||||||
@ -3087,20 +3088,15 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_iso_level3_shift() {
|
fn parse_iso_level3_shift() {
|
||||||
assert_eq!(
|
for input in ["ISO_Level3_Shift+A", "Mod5+A", "AltGr+A"] {
|
||||||
"ISO_Level3_Shift+A".parse::<Key>().unwrap(),
|
assert_eq!(
|
||||||
Key {
|
input.parse::<Key>().unwrap(),
|
||||||
trigger: Trigger::Keysym(Keysym::a),
|
Key {
|
||||||
modifiers: Modifiers::ISO_LEVEL3_SHIFT
|
trigger: Trigger::Keysym(Keysym::a),
|
||||||
},
|
modifiers: Modifiers::ISO_LEVEL3_SHIFT
|
||||||
);
|
},
|
||||||
assert_eq!(
|
);
|
||||||
"Mod5+A".parse::<Key>().unwrap(),
|
}
|
||||||
Key {
|
|
||||||
trigger: Trigger::Keysym(Keysym::a),
|
|
||||||
modifiers: Modifiers::ISO_LEVEL3_SHIFT
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user