Also passthrough Insert and Shift+Insert which cocoa seems to intercept

This commit is contained in:
Kovid Goyal 2021-10-14 20:27:22 +05:30
parent 706494016c
commit c6039fc399
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -492,8 +492,14 @@ - (void)render_frame_received:(id)displayIDAsID
return true;
}
}
// ctrl+whatever+esc and cmd+whatever+esc
if (ch == 0x1b && (modifierFlags & (NSEventModifierFlagCommand | NSEventModifierFlagControl))) return true;
switch (ch) {
case 0x1b: // Esc
if (modifierFlags & (NSEventModifierFlagCommand | NSEventModifierFlagControl)) return true;
break;
case NSInsertFunctionKey: // Insert
if (!modifierFlags || modifierFlags == NSEventModifierFlagShift) return true;
break;
}
return false;
}