You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I first noticed this years ago with the Escape button on fullscreen. If you bind the same shortcuts as Chrome, the shortcuts on Chrome stops working. Really annoying bug!
I wanted to bind a reload to Command/Control R like Chrome has - pretty standard.
I believe it depends on what you have open first. If you don't have chrome running the bind will work on nw.js but if you have both running - it won't work in neither.
If you quit nw.js - it still won't run on chrome. You will have to restart it and it may work.
This was an issue with all versions but for the record I'm using 0.29.4.
var gui = require('nw.gui');
var key;
if( device == 'osx' ){
key = 'Command+R';
} else {
key = 'Ctrl+R';
}
var option = {
key : key,
active : function() {
console.log("Global desktop keyboard shortcut: " + this.key + " active.");
},
failed : function(msg) {
console.log(msg);
}
};
var shortcut = new gui.Shortcut(option);
gui.App.registerGlobalHotKey(shortcut);
(Edit: I now can't bind the shortcut on osx)
Error: Unable to register the hotkey
at Function.Shortcut.registerGlobalHotKey (extensions::nw.Shortcut:204)
at Object.bindingsAPI.compiledApi.registerGlobalHotKey (extensions::nw.App:117)
at <anonymous>:12:9
The text was updated successfully, but these errors were encountered:
Press 'Command + R' again in chrome browser, the page is not reloaded
This is exactly part of what I'm talking about. Is this normal behaviour? As that is not what I'm after. Shouldn't the shortcuts be relative to the focused application?
I can't replicate the issue where it doesn't work in both at the moment. But it does happen sometimes (it is random). Especially with the Esc key to exit fullscreen.
In the video below, you can see nw.js shortcuts are trigged while focused on chrome.
Shortcut represents a global keyboard shortcut, also known as system-wide hotkey. If registered successfully, it works even if your app does not have focus.
Operating System : OSX
I first noticed this years ago with the
Escape
button on fullscreen. If you bind the same shortcuts as Chrome, the shortcuts on Chrome stops working. Really annoying bug!I wanted to bind a reload to Command/Control R like Chrome has - pretty standard.
I believe it depends on what you have open first. If you don't have chrome running the bind will work on nw.js but if you have both running - it won't work in neither.
If you quit nw.js - it still won't run on chrome. You will have to restart it and it may work.
This was an issue with all versions but for the record I'm using
0.29.4
.(Edit: I now can't bind the shortcut on osx)
The text was updated successfully, but these errors were encountered: