hediet / visual-keyboard

A virtual keyboard displaying key bindings of VS Code as you type.
https://hediet.github.io/visual-keyboard/
GNU General Public License v3.0
31 stars 3 forks source link

Deal With Iohook Bug on Windows That Causes the Mouse to Lag #2

Open hediet opened 4 years ago

hediet commented 4 years ago

This bug is a serious problem when launching a second instance of VS Code.

edrcq commented 4 years ago

I tried to replicate this bug with:

2 differents folder, each of these folder contains one node_modules with an installation of iohook. If you run "node index.js" from 2 separate cmd.exe, in each folder. The bug appear.

Very slow-mo mouse, buggy-laggy behaviors.

Conclusion: it is not only VS code

How can we fix it?

hediet commented 4 years ago

Thanks for your commnt, I didn't know people are actually interested in this extension ;)

How can we fix it?

Are you a windows user (like myself)? I think this is a windows only problem. As windows users always have the .Net Framework installed, I think using a C# console application that uses a proper library might be a suitable solution. This application could use JSON RPC to communicate with the extension.

Given the low interest of the community in this extension, I'm currently not super motivated in fixing this, but I'll keep it on my todo list.

Also, this extension only starts to be really useful if it dynamically considers all keybindings/when-contexts from VS Code (currently, they are statically bundled with the extension). There is no API for that and due to the low interest in this extension I guess an API for that is never happening.

Wizek commented 4 years ago

As this is still not fixed in iohook, I'm switching over to something that seems to work much better in my projects. Perhaps you want to check it out too:

https://www.npmjs.com/package/gkm

hediet commented 4 years ago

Thanks, that looks interesting! However, it requires Java to be installed...

I think iohook is fine for Linux. If I find time, I'll investigate to use .Net for Windows and iohook for Linux and Mac. What do you think?