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

Registering a global shortcut with a non present F key causes previously created global shortcuts to not trigger #11702

Closed
Sheldan opened this issue Jan 23, 2018 · 3 comments

Comments

@Sheldan
Copy link

Sheldan commented Jan 23, 2018

  • Electron version:
    1.7.11
  • Operating system:
    Fedora 27 with Linux 4.14.13

Expected behavior

If a F key is not present on the keyboard, it should not influence the behavior of other keys.

Actual behavior

I have a keyboard with F1-F12. According to the documentation, it is possible to define shortcuts for the F keys from F1 up to F24. If I define a shortcut with
electron.globalShortcut.register('F13', function(){ electron.app.quit(); })

every valid shortcut handler added before will not trigger.
The following will work, but if you swap the to register calls, the a shortcut will not work.

electron.globalShortcut.register('F13', function(){ electron.app.quit(); }) electron.globalShortcut.register('a', function(){ electron.app.quit(); })

How to reproduce

I forked the electron-quick-start and added the code triggering the issue in the main.js. If you swap the two global shortcuts, it will work for a at least.

It is in the master branch and can be started with npm install and npm start afterwards.

@welcome
Copy link

welcome bot commented Jan 23, 2018

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

@codebytere
Copy link
Member

This should be resolved by #15542.

@SupremeTechnopriest
Copy link

SupremeTechnopriest commented Oct 4, 2023

Looks like this has regressed. Cant seem to bind global shortcuts for F13-F24. Electron 26.2.4 on Ubuntu 22.04. The register function returns false.

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

No branches or pull requests

3 participants