Merge pull request #9743 from electron/number-accelerator-modifier
Don't mutate the accelerator character with the shift key if it's a number
This commit is contained in:
commit
bda21216e7
1 changed files with 6 additions and 1 deletions
|
@ -26,7 +26,12 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) {
|
||||||
&characterIgnoringModifiers);
|
&characterIgnoringModifiers);
|
||||||
|
|
||||||
if (character != characterIgnoringModifiers) {
|
if (character != characterIgnoringModifiers) {
|
||||||
modifiers ^= NSShiftKeyMask;
|
if (isdigit(characterIgnoringModifiers)) {
|
||||||
|
// 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…
Add table
Add a link
Reference in a new issue