Opticos / GWSL-Source

The actual code for GWSL. And some prebuilt releases.
https://opticos.github.io/gwsl/
Other
1.16k stars 80 forks source link

Need exclusive keyboard mode option and a hotkey to exit that mode #166

Closed I-Want-ToBelieve closed 1 year ago

I-Want-ToBelieve commented 1 year ago

The following is the implementation of similar functions in other software:

Force Virtual Machines to Grab Keyboard and Mouse Input in Vmware

Capture windows logo key in X410

Right-ctrl in VirtualBox

I-Want-ToBelieve commented 1 year ago

Temporary Solution:

Use sharpkeys in windows systems to map the Left Windows key and Left Alt key to F23 key and F24 key, respectively. image

Create a .Xmodmap file in the linux system and place it in the home directory. https://wiki.archlinux.org/title/Xmodmap

keycode 118 = Super_L NoSymbol Super_L
keycode 119 = Alt_L Meta_L Alt_L Meta_L

Xmodmap will map F23 and F24 back to Left windows key and left alt key respectively. Through the transfer of F23 key and F24 key, we have alleviated the problem of hotkey conflicts.

Pololot64 commented 1 year ago

I am not sure I can do anything about this as I do not change the vcxsrv code. Intercepting keys is not something I want to mess with. Is the problem that a window is capturing your keyboard and/or mouse and not letting go?

I-Want-ToBelieve commented 1 year ago

When I press the Alt + Tab key combination on the Linux Desktop, I actually switch the focus window of the Windows System Desktop, which is expected to switch the window of the Linux Desktop.

The essential problem is that the vcxsrv window does not have exclusive access to the keyboard. Not sure how this is done, maybe a virtual machine like VirtualBox does it by uninstalling the keyboard device from the host and installing it in the virtual machine.