Merge pull request #7236 from yuya-oc/accelerator-for-redo
Use Ctrl+Y as the accelerator of redo on Windows
This commit is contained in:
commit
0ac4b89a0a
2 changed files with 11 additions and 1 deletions
|
@ -69,7 +69,7 @@ const roles = {
|
|||
},
|
||||
redo: {
|
||||
label: 'Redo',
|
||||
accelerator: 'Shift+CommandOrControl+Z',
|
||||
accelerator: process.platform === 'win32' ? 'Control+Y' : 'Shift+CommandOrControl+Z',
|
||||
webContentsMethod: 'redo'
|
||||
},
|
||||
resetzoom: {
|
||||
|
|
|
@ -417,6 +417,16 @@ describe('menu module', function () {
|
|||
assert.equal(item.label, 'Hide Electron Test')
|
||||
assert.equal(item.accelerator, undefined)
|
||||
assert.equal(item.getDefaultRoleAccelerator(), 'Command+H')
|
||||
|
||||
item = new MenuItem({role: 'undo'})
|
||||
assert.equal(item.label, 'Undo')
|
||||
assert.equal(item.accelerator, undefined)
|
||||
assert.equal(item.getDefaultRoleAccelerator(), 'CommandOrControl+Z')
|
||||
|
||||
item = new MenuItem({role: 'redo'})
|
||||
assert.equal(item.label, 'Redo')
|
||||
assert.equal(item.accelerator, undefined)
|
||||
assert.equal(item.getDefaultRoleAccelerator(), process.platform === 'win32' ? 'Control+Y' : 'Shift+CommandOrControl+Z')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue