From d5e2a73d99df1ac74d319294edea335b684ae967 Mon Sep 17 00:00:00 2001 From: lukebarnard Date: Thu, 4 Jan 2018 12:06:13 +0000 Subject: [PATCH] Add alt condition back in, rename to specify igorance of shift because this is really what this function is for - we want to ignore specifically shift but not necessarily alt (despite this probably not having any real impact). --- src/Keyboard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Keyboard.js b/src/Keyboard.js index 8e6983fae5..bf83a1a05f 100644 --- a/src/Keyboard.js +++ b/src/Keyboard.js @@ -69,11 +69,11 @@ export function isOnlyCtrlOrCmdKeyEvent(ev) { } } -export function isCtrlOrCmdKeyEvent(ev) { +export function isOnlyCtrlOrCmdIgnoreShiftKeyEvent(ev) { const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0; if (isMac) { - return ev.metaKey && !ev.ctrlKey; + return ev.metaKey && !ev.altKey && !ev.ctrlKey; } else { - return ev.ctrlKey && !ev.metaKey; + return ev.ctrlKey && !ev.altKey && !ev.metaKey; } }