LocalShortcut in renderer.js
bhaktigohel opened this issue · 2 comments
bhaktigohel commented
Can I use electron-localshortcut in renderer.js (which is not main file) ???
And if yes, then how ??
I know about remote api of electron but it doesn't work ?
Thanks in advance .
chrilith commented
This works for me.
import { remote } from 'electron';
import localShorcut from "electron-localshortcut";
localShorcut.register(remote.getCurrentWindow(), "Z", myEventhandler);
youngyou commented
This works for me.
import { remote } from 'electron'; import localShorcut from "electron-localshortcut"; localShorcut.register(remote.getCurrentWindow(), "Z", myEventhandler);
I think the the callback will trigger twice after reload.