diff --git a/lib/browser/api/menu-item-roles.js b/lib/browser/api/menu-item-roles.js index 4264bcd35e8d..888ff4f6b5eb 100644 --- a/lib/browser/api/menu-item-roles.js +++ b/lib/browser/api/menu-item-roles.js @@ -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: { diff --git a/spec/api-menu-spec.js b/spec/api-menu-spec.js index 4ea6d71cdb5a..1528d563901e 100644 --- a/spec/api-menu-spec.js +++ b/spec/api-menu-spec.js @@ -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') }) }) })