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