From 8e57fd93c61a4a99802159a374251bf9d924e0e8 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 May 2019 20:35:13 +0530 Subject: [PATCH] macOS: Fix a regression that caused cmd+v to double up in the dvorak keyboard layout Fixes #1652 --- docs/changelog.rst | 3 +++ glfw/cocoa_init.m | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 5e6a59b0f..1d2a9c2be 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -17,6 +17,9 @@ To update |kitty|, :doc:`follow the instructions `. to occasionally freeze in certain situations, such as moving it between monitors or transitioning from/to fullscreen (:iss:`1641`) +- macOS: Fix a regression that caused :kbd:`cmd+v` to double up in the dvorak + keyboard layout (:iss:`1652`) + 0.14.0 [2019-05-24] --------------------- diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m index d181b18e8..ae846c68b 100644 --- a/glfw/cocoa_init.m +++ b/glfw/cocoa_init.m @@ -319,7 +319,9 @@ is_ctrl_tab(NSEvent *event, NSEventModifierFlags modifierFlags) { static inline bool is_cmd_period(NSEvent *event, NSEventModifierFlags modifierFlags) { - return event.keyCode == kVK_ANSI_Period && modifierFlags == NSEventModifierFlagCommand; + if (modifierFlags != NSEventModifierFlagCommand) return false; + if ([event.charactersIgnoringModifiers isEqualToString:@"."]) return true; + return false; } int _glfwPlatformInit(void)