From 728eceb620d32da00eaa0dfb751449377d5dd5e9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 10 Feb 2022 18:56:47 +0530 Subject: [PATCH] Add implementation for focus moving hardcoded shortcuts --- glfw/cocoa_init.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m index 98784618f..c2ec901f4 100644 --- a/glfw/cocoa_init.m +++ b/glfw/cocoa_init.m @@ -660,7 +660,8 @@ lookup_global_shortcut(NSEvent *event, NSDictionary *global static int default_global_character_shortcut(uint32_t ch, NSEventModifierFlags mods) { - (void)ch; (void)mods; + if ((ch == '`' || ch == '~') && (mods & ~NSEventModifierFlagShift) == NSEventModifierFlagCommand) return kSHKMoveFocusToNextWindow; + if (ch == NSF4FunctionKey && (mods & ~NSEventModifierFlagShift) == NSEventModifierFlagCommand) return kSHKMoveFocusToActiveOrNextWindow; return kSHKUnknown; }