Don't mutate the accelerator character wuth the shift key if it's a number

This commit is contained in:
Samuel Attard 2017-06-13 20:29:54 +10:00
parent 014aaccfc6
commit 29dbb93f16

View file

@ -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) {