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
There is issue, which we are able to see when trying to use Global shortcuts gui.Shortcut, when we register a command say "ctrl+f".
Expected Behaviour : shortcut should work within the app, Yea it works, but
Defered behaviour: when app is background, say for example we are active in some other app "chrome" perhaps, if we initiate the same key press, it goes to my node-webkit app instead of that active app, plus keyboard ns event does NOT bubble to other application. Search bar not shows up in "chrome".
snippet:
var gui = require('nw.gui');
var option = {
key : "Ctrl+f",
active : function() {
console.log("Only Node Webkit app will recieve this KEYpress, NO other apps even when they are active !!!");
},
failed : function(msg) {
// :(, fail to register the |key| or couldn't parse the |key|.
console.log(msg);
}
};
// Create a shortcut with |option|.
var shortcut = new gui.Shortcut(option);
// Registering Global HotKey
gui.App.registerGlobalHotKey(shortcut);
Tested both in 0.10.6 and 0.11 build.
System Specs:
OS : OS X yosemite 10.10 and Maverics.
Hi @kamesh-a, this is the expected behaviour. The shortcut is global, i.e. system-wide, so, yes, it will override other shortcuts (otherwise it won't work when the app is not active), the documentation in Shortcut is clear: "If registered successfully, it works even if your app does not have focus".
Hello,
There is issue, which we are able to see when trying to use Global shortcuts gui.Shortcut, when we register a command say "ctrl+f".
Expected Behaviour : shortcut should work within the app, Yea it works, but
Defered behaviour: when app is background, say for example we are active in some other app "chrome" perhaps, if we initiate the same key press, it goes to my node-webkit app instead of that active app, plus keyboard ns event does NOT bubble to other application. Search bar not shows up in "chrome".
snippet:
Tested both in 0.10.6 and 0.11 build.
System Specs:
OS : OS X yosemite 10.10 and Maverics.
Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: