Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcuts for menus do not work on Windows #3764

Closed
blackslate opened this issue Aug 13, 2015 · 4 comments
Closed

Keyboard shortcuts for menus do not work on Windows #3764

blackslate opened this issue Aug 13, 2015 · 4 comments
Labels

Comments

@blackslate
Copy link

Follow-up on Native menu keyboard shortcuts #367 (Closed)

The NWJS MenuItem entry seems to promise that...

#!javascript

menu.append(new gui.MenuItem({
  label: 'Quit'
, key: "X"
, modifiers: "ctrl"
, click : function () {
    console.log('Todo: Quit')
  }
})

... should show "Ctrl+X" as the shortcut, and that pressing ctrl+x should trigger the click action. This does not seem to be the case in nwjs-v0.12.3-win-x64.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@pedro-lucas
Copy link

+1

@bleush38p
Copy link

This behavior is the same as on OS X, as far as I am aware. You've got a capital X. Pressing control+shift+x should trigger the action. (Pressing ^X will trigger the action, ^x will not.)

The shortcut does not display on Windows as noted in #367. Looks like that's issue #3694.

@Christywl
Copy link
Contributor

It works fine for me on Windows with nwjs-sdk-v0.25.0. Please try the latest nwjs build.

<script>
var menu = new nw.Menu({type: "menubar"});
var submenu = new nw.Menu();
submenu.append(new nw.MenuItem({
  label: "Quit",
  key: "X",
  modifiers: "ctrl",
  click: function() {
    console.log("Todo: Quit")
  },
}));
menu.append(new nw.MenuItem({
  label: "test",
  submenu: submenu
}))
nw.Window.get().menu = menu;

</script>

image

@Christywl
Copy link
Contributor

close until there is more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants