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

globalShortcut should allow for registering shortcut that should be triggered once by keypress #20567

Closed
3 tasks done
sky0matic opened this issue Oct 14, 2019 · 1 comment
Closed
3 tasks done

Comments

@sky0matic
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 6.0.12
  • Operating System:
    • Windows 10 Pro (1903)
  • Last Known Working Electron version:

Expected Behavior

globalShortcut.register should only call the callback once by keypress when the user keeps pressing the keys matching a shortcut (or have a mode for it)

E.g. On Spotify keeping pressing Next should only change songs once.

Actual Behavior

globalShortcut.register is calling the callback repeatedly when the user keeps pressing the keys matching the shortcut

E.g. On Spotify keeping pressing Next is changing the songs repeatedly to the point it will actually crash

To Reproduce

  • Simply register a simple shortcut like this :
globalShortcut.register('num7', () => console.log('num7');
  • Run the app
  • Keep pressing NumPad7 and notice all the num7 console logs.

Screenshots

Additional Information

@electron-triage
Copy link

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If this is still reproducible on a supported version, please open a new issue with any other new information that a maintainer should know.

Thank you for taking the time to report this issue and helping to make Electron better! Your help is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
6.1.x
Unsorted Issues
Development

No branches or pull requests

3 participants