Don't mutate the accelerator character wuth the shift key if it's a number
This commit is contained in:
parent
014aaccfc6
commit
29dbb93f16
1 changed files with 7 additions and 1 deletions
|
@ -26,8 +26,14 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) {
|
|||
&characterIgnoringModifiers);
|
||||
|
||||
if (character != characterIgnoringModifiers) {
|
||||
// 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) {
|
||||
character = NSDeleteCharacter;
|
||||
|
|
Loading…
Reference in a new issue