microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
16.92k stars 798 forks source link

Add uinput module to distro so we can use custom mouse mappings (ex: left mouse) #11270

Open av-emogai opened 4 months ago

av-emogai commented 4 months ago

Is your feature request related to a problem? Please describe. I would like to use a left mouse in the Ubuntu WSL Distribution The inbuilt input-remapper in Ubuntu 22.04 does not work as the uinput module is not present in the out of box ubuntu for WSL2 The service fails to start with the error: not able to see uinput file

Describe the solution you'd like I would like to use a left mouse in the Ubuntu WSL Distribution; Other users on the web are looking for custom mouse buttons (4th and 5th button for gaming, etc)

Describe alternatives you've considered Custom ubuntu distribution for 22.04

Additional context Any other way to get a left mouse to work inside Ubuntu for WSL? Please advice.

sirredbeard commented 3 months ago

I found a related question with a possible solution here.

symbioid commented 4 weeks ago

Yes please. I can't get remapping working with xmodmap, and systemd is wonky with tmux, so I'm using init.d.

I tried to install keyd for kernel level remapping, but because modules aren't allowed (or require a whole kernel compilation to support it) the only way to remap that I've found that actually works is MS Powertoys. But THAT only works if you run Powertoys in Admin mode, which is not something I feel comfortable doing.

If we could have uinput built in we could remap keys easily and natively.

I don't understand the logic of this, since so many vim users remap Caps-Lock. The claim is "this is for devs, not a full linux distro) - but since devs remap it seems like something you'd want to have built in.

The "related solution" won't work. xmodmap doesn't work, and the op even says (misspelled) they tried "xmode" (xmod). I have spent a LOT of hours figuring a solution that works and doesn't interfere with TMUX. Even though you can set the codes with xmodmap and xev shows it properly, it doesn't activate like it actually should.

uinput compiled into the default kernel would allow these remaps (and probably even more/better features). PLEASE MS, ADD THIS!