You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Windows 10 / Electron
Issue: Keydown and Keyup Hook fails when a new getUserMediaStream of any device is initialized, however it only fails to do so when the electron client is focused. If the client is not focused while the Stream is allocated to a variable then the hook resumes correct functionality.
In any front end section such as Core add a call to navigator.mediaDevices.getUserMedia() utilizing navigator.mediaDevices.enumerateDevices() for grabbing your local Microphone DeviceId.
Once initialized, no logs are present.
The text was updated successfully, but these errors were encountered:
You can find more details about your issue in this topic #42 . In fact, it has some some issue when your app uses WebRTC. I had this issue myselff as well and had to do a bad workaround: when the app is focused add listeners for keys using window.addEventListener and when app in not focused use uiohook-napi
You can find more details about your issue in this topic #42 . In fact, it has some some issue when your app uses WebRTC. I had this issue myselff as well and had to do a bad workaround: when the app is focused add listeners for keys using window.addEventListener and when app in not focused use uiohook-napi
thanks, that's a solution, but i have found another way to fix this bug. You have to create child process by using electron utilityProcess and initiate key listeners in that child process. If some conditions are met (for example shortcut is pressed or some key), and you want to emit message from main to renderer process, all you need is to postMessage from child process to main process and use webContents.send after
Platform: Windows 10 / Electron
Issue: Keydown and Keyup Hook fails when a new getUserMediaStream of any device is initialized, however it only fails to do so when the electron client is focused. If the client is not focused while the Stream is allocated to a variable then the hook resumes correct functionality.
To replicate:
In main\index.ts add:
import {uIOhook} from 'uiohook-napi'
uIOhook.start();
uIOhook.on('keydown', (e) => {
console.log(e);
});
In any front end section such as Core add a call to navigator.mediaDevices.getUserMedia() utilizing navigator.mediaDevices.enumerateDevices() for grabbing your local Microphone DeviceId.
Once initialized, no logs are present.
The text was updated successfully, but these errors were encountered: