Fix command+tab #1032
This commit is contained in:
parent
e7e846cd42
commit
48ab5e5024
@ -683,6 +683,14 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
|
|||||||
let mut disable_numlock = false;
|
let mut disable_numlock = false;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
en.reset_flag();
|
en.reset_flag();
|
||||||
|
// When long-pressed the command key, then press and release
|
||||||
|
// the Tab key, there should be CGEventFlagCommand in the flag.
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
for ck in evt.modifiers.iter(){
|
||||||
|
if let Some(key) = KEY_MAP.get(&ck.value()){
|
||||||
|
en.add_flag(key);
|
||||||
|
}
|
||||||
|
}
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
let mut to_release = Vec::new();
|
let mut to_release = Vec::new();
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
@ -710,8 +718,6 @@ fn legacy_keyboard_mode(evt: &KeyEvent) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(target_os = "macos")]
|
|
||||||
en.add_flag(key);
|
|
||||||
#[cfg(not(target_os = "macos"))]
|
#[cfg(not(target_os = "macos"))]
|
||||||
{
|
{
|
||||||
if key == &Key::CapsLock {
|
if key == &Key::CapsLock {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user