From 314da124f317642a1f496ac55f88ac49c9432f39 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 1 Jul 2024 09:54:01 +0530 Subject: [PATCH] macOS 15: Handle Fn modifier when detecting global shortcuts Fixes #7582 --- docs/changelog.rst | 2 ++ glfw/cocoa_init.m | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 199726c55..b87709cb6 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -82,6 +82,8 @@ Detailed list of changes - macOS: Fix rendering of the unicode hyphen (U+2010) character when using a font that does not include a glyph for it (:iss:`7525`) +- macOS 15: Handle Fn modifier when detecting global shortcuts (:iss:`7582`) + 0.35.2 [2024-06-22] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m index 284c57d49..ffdf50957 100644 --- a/glfw/cocoa_init.m +++ b/glfw/cocoa_init.m @@ -579,7 +579,7 @@ - (void)render_frame_received:(id)displayIDAsID return scv == kSHKMoveFocusToActiveOrNextWindow || scv == kSHKMoveFocusToNextWindow; } -#define USEFUL_MODS(x) (x & (NSEventModifierFlagShift | NSEventModifierFlagOption | NSEventModifierFlagCommand | NSEventModifierFlagControl)) +#define USEFUL_MODS(x) (x & (NSEventModifierFlagShift | NSEventModifierFlagOption | NSEventModifierFlagCommand | NSEventModifierFlagControl | NSEventModifierFlagFunction)) static void build_global_shortcuts_lookup(void) {