mirror of
https://github.com/YaLTeR/niri.git
synced 2024-09-11 20:37:25 +03:00
Compare commits
2 Commits
2e20db4577
...
edabc60302
Author | SHA1 | Date | |
---|---|---|---|
|
edabc60302 | ||
|
0c7686230d |
@ -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