mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
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:
@@ -26,7 +26,12 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) {
|
||||
&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) {
|
||||
|
||||
Reference in New Issue
Block a user