From 29dbb93f16f5844345239c4c7d57d45563450981 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 13 Jun 2017 20:29:54 +1000 Subject: [PATCH] Don't mutate the accelerator character wuth the shift key if it's a number --- atom/browser/ui/accelerator_util_mac.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/atom/browser/ui/accelerator_util_mac.mm b/atom/browser/ui/accelerator_util_mac.mm index cf1d3de4d2..c10f4cb6ed 100644 --- a/atom/browser/ui/accelerator_util_mac.mm +++ b/atom/browser/ui/accelerator_util_mac.mm @@ -26,7 +26,13 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) { &characterIgnoringModifiers); if (character != characterIgnoringModifiers) { - modifiers ^= NSShiftKeyMask; + // 48 === '0', 57 === '9' + if (characterIgnoringModifiers >= 48 && characterIgnoringModifiers <= 57) { + // The character is a number so lets not mutate it with the modifiers + character = characterIgnoringModifiers; + } else { + modifiers ^= NSShiftKeyMask; + } } if (character == NSDeleteFunctionKey) {