macOS: Fix a regression in the previous release that broke using :kbd:ctrl+shift+tab
Fixes #1671
This commit is contained in:
parent
5001797179
commit
59205a4caf
2 changed files with 11 additions and 4 deletions
|
|
@ -12,6 +12,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||
or inserting into the terminal. You can have them on separate lines,
|
||||
separated by arbitrary characters, or even serialized as JSON (:iss:`1665`)
|
||||
|
||||
- macOS: Fix a regression in the previous release that broke using
|
||||
:kbd:`ctrl+shift+tab` (:iss:`1671`)
|
||||
|
||||
|
||||
0.14.1 [2019-05-29]
|
||||
---------------------
|
||||
|
|
|
|||
|
|
@ -313,10 +313,13 @@ - (void)render_frame_received:(id)displayIDAsID
|
|||
|
||||
static inline bool
|
||||
is_ctrl_tab(NSEvent *event, NSEventModifierFlags modifierFlags) {
|
||||
if (modifierFlags == NSEventModifierFlagControl || modifierFlags == (
|
||||
NSEventModifierFlagControl | NSEventModifierFlagShift)) {
|
||||
if ([event.charactersIgnoringModifiers isEqualToString:@"\t"]) return true;
|
||||
}
|
||||
NSLog(@"%@\n", event.charactersIgnoringModifiers);
|
||||
if (
|
||||
(modifierFlags == NSEventModifierFlagControl &&
|
||||
[event.charactersIgnoringModifiers isEqualToString:@"\t"]) ||
|
||||
(modifierFlags == (NSEventModifierFlagControl | NSEventModifierFlagShift) &&
|
||||
[event.charactersIgnoringModifiers isEqualToString:@"\x19"])
|
||||
) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -343,6 +346,7 @@ int _glfwPlatformInit(void)
|
|||
NSEventModifierFlags modifierFlags = [event modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask;
|
||||
if (is_ctrl_tab(event, modifierFlags) || is_cmd_period(event, modifierFlags)) {
|
||||
// Cocoa swallows Ctrl+Tab to cycle between views
|
||||
NSLog(@"1111111111\n");
|
||||
[[NSApp keyWindow].contentView keyDown:event];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue