don't repeat the menu key if it is press-held

This commit is contained in:
bunnie 2022-03-27 00:19:55 +08:00
parent 96f0a0d2ea
commit a6af300157

View file

@ -544,7 +544,9 @@ mod implementation {
KeyMap::Qwertz => map_qwertz(rc),
_ => ScanCode {key: None, shift: None, hold: None, alt: None},
};
if code.hold == None { // if there isn't a pre-defined meaning if the key is held, it's a repeating key
if code.hold == None
&& !((rc.r == 5) && (rc.c == 2)) // scan code for the menu key
{ // if there isn't a pre-defined meaning if the key is held *and* it's not the menu key: it's a repeating key
if let Some(key) = code.key {
self.repeating_key = Some(key);
}