I'm building an Electron app and I want the user to be able to open the app within a button click, using a keyboard shortcut. I want to set the shortcut automatically in the code.
It should work after the user closed the app and after a computer startup.
I've tried this how-to-open-electron-app-using-shortcut-key , and it works if the user run the app and closed the app already, but it won't work after a computer reset because the Electron process stoped, and when I clicked the shortcut more then onse, the app buttons stopping to work until I left with only one window open.
Is there another way to implement that? Maybe a process that listening to the specific key and runs whenever the computer is on?