Closed pgupt closed 4 years ago
You need to iohook.off('event') manually
@ape-casear it still remembers old event. In my case, it remembers alt key is pressed.
I found out the issue. I am new to Vue and do not have complete knowledge of it.
So I was starting the iohook in actions. The advantage or disadvantage with actions in Vue is that it will called only once. So my iohook.start wasn't being called again and that is why keypress persisted.
In my electron-vue app, I am registering iohook for detecting keypress event. For the first time I get the right event I am looking for. (e.g. I am looking for alt + space and shift+space)
After this I call iohook.stop() thinking it would stop and reset the iohook.
But the second time I press alt + space, I get true for shift also even though I had not pressed it. I think iohook does not reset itself when stopped.
Expected Behavior
iohook should reset events when stop() is called
Your Environment