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
Global shortcut unregisters/disables default actions #1338
Comments
This behavior is intended, it sounds good to add a way to invoke default actions though. |
Any chance for this to be implemented in the near future? |
+1, I want a way to register a global keyboard shortcut without intercepting and preventing the default behaviour. Same example as above, (Ctrl+C). |
👍 Definately a necessary feature, preferably without writing things natively, defeating the 'cross-platform'-ness |
👍 I have a similar issue on the NW.js repo: nwjs/nw.js#3503 |
I have to say this is a very useful feature, but it is impossible with the APIs provided by system, it is by design that registering a global shortcut would disable the default actions. The only possible way to achieve this is to set global keyboard hooks, which on some platforms would make the app behave like virus, and for others it would require root privilege to run. And it is better to write a node module for this instead of make it a built-in feature of Electron. So I'm closing this as won't fix. |
hey every one i'm new here and i'm just trying to register globalShortcut like globalShortcut.register('ctrl+F5', function() {
console.log('ctrl+F5 pressed');
}); But ctrl+F5 is not working in other applications like Firefox :( Thanks in advance |
@aAmitSengar Global shortcuts in electron block any other application from listening to that keyboard shortcut. That's what this issue is about. There is currently no fix for this |
@zcbenz is there any chance that two years later this might be reconsidered? It would enable a LOT of use cases I think. |
@slapbox This might help. |
Thanks @akshayhashedIn! |
Why this issue is closed while there's no available solution? |
still having this issue, is the solution here yet? |
啥时候能有对应的api啊 |
Figured out a work around: |
Not sure if this is the intended outcome, but wasnt what I expected;
if I register 'ctrl+c' or 'ctrl+x' as a global shortcut, the system will only listen to that function and not run the default copy/cut-function. I was hoping to bind my listener as an addition to the default function..
The text was updated successfully, but these errors were encountered: