question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

API to test global shortcuts

See original GitHub issue

I have window that only shows when a key combination is pressed (Ctrl+Space by default). The behaviour uses electron’s globalShortcut.

I have found no way of simulating the shortcut, is this possible somehow?

Keep it up!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
AdrianoFerraricommented, Dec 5, 2019

I recommend this issue be re-opened. None of the above work-arounds work reliably (they’ve all worked for me at some point, but updates to Node, Electron, or new OS cause them to break, especially on macOS).

Given that Electron apps can and do use global shortcuts, it’d be great to be able to test them. As it stands, I’ve had to disable testing on macOS, because I can’t get spectron to handle global shortcuts like “Cmd+S”.

6reactions
aigarsdzcommented, Oct 1, 2016

I am facing the same problem. RobotJS is nice and does the job well, but I really don’t want to add another dependency just to test a single feature of my app. Any chance for this to be implemented into Spectorn?

Read more comments on GitHub >

github_iconTop Results From Across the Web

API to test global shortcuts · Issue #96 · electron ... - GitHub
I have window that only shows when a key combination is pressed (Ctrl+Space by default). The behaviour uses electron's globalShortcut.
Read more >
Global Shortcuts Dialog | TestComplete Documentation
Global Shortcuts Dialog ; Pause, Shift+F10, Pauses the test run or test recording. This shortcut works in TestComplete and in Connected and Self-Testing...
Read more >
Shortcuts: Allow users to initiate action in your app - Slack API
Shortcuts give users clear entry points to access your app. Apps can create global shortcuts that are available from anywhere in Slack, and...
Read more >
Request your first API in Shortcuts on iPhone or iPad
To request your first API in Shortcuts, you create the URL that points at the API “endpoint” that you want to talk to,...
Read more >
Find out what process registered a global hotkey? (Windows ...
One possible way is to use the Visual Studio tool Spy++. Give this a try: Run the tool (for me, it's at C:\Program...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found