Skip to content

Commit ac8b018

Browse files
author
Jessica Lord
committed
Merge pull request electron#207 from electron/shortcut-keybinding
Use different shortcut keybinding
2 parents ea1efb6 + ab2c150 commit ac8b018

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

main-process/menus/shortcuts.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ const dialog = electron.dialog
44
const globalShortcut = electron.globalShortcut
55

66
app.on('ready', function () {
7-
globalShortcut.register('CommandOrControl+Alt+D', function () {
7+
globalShortcut.register('CommandOrControl+Alt+K', function () {
88
dialog.showMessageBox({
99
type: 'info',
10-
message: 'Success! You pressed the registered global shortcut keybinding.',
11-
buttons: ['Yay']
10+
message: 'Success!',
11+
detail: 'You pressed the registered global shortcut keybinding.',
12+
buttons: ['OK']
1213
})
1314
})
1415
})

sections/menus/shortcuts.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ <h3>The <code>globalShortcut</code> and <code>Menu</code> modules can be used to
3535
</button>
3636
<div class="demo-box">
3737
<p>
38-
To try this demo, press <kbd class="normalize-to-platform">CommandOrControl+Alt+D</kbd> on your keyboard.
38+
To try this demo, press <kbd class="normalize-to-platform">CommandOrControl+Alt+K</kbd> on your keyboard.
3939
</p>
4040

4141
<p>

0 commit comments

Comments
 (0)