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,7 +26,13 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) {
|
||||||
&characterIgnoringModifiers);
|
&characterIgnoringModifiers);
|
||||||
|
|
||||||
if (character != 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) {
|
if (character == NSDeleteFunctionKey) {
|
||||||
|
|
Loading…
Reference in a new issue