Xiexe / XSOverlay-Issue-Tracker

This is a public repository for tracking issues with XSOverlay. There will be no other activity here other than bug reports / feature requests.
10 stars 4 forks source link

Left & Right Alt keys both send Right alt #291

Open information-redacted opened 8 months ago

information-redacted commented 8 months ago

Describe the bug in detail: The left & right alt keys in the XSO keyboard send the right alt signal, resulting in applications not behaving as intended when using left alt in the overlay.

Provide steps to reproduce the bug: Have an application such as which differentiates between left and right alt keys, such as MobaXTerm, and try to send a left-alt key, this is most prevalent within weechat (switching between buffers not working), but can additionally be tested online at https://en.key-test.ru.

Expected behavior: The correct alt key should be sent instead of always right-alt.

Output Log: Attached - output_log_2023-10-17__13.16.29.txt

Additional Information: This happens on both live and beta, with both SteamVR live and beta.

information-redacted commented 8 months ago

Pressed enter early by accident. Please hold while I edit the issue. Fixed.

Xiexe commented 8 months ago

As far as I'm aware with the Win32 api it's not possible to differentiate between the two when using the United States keyboard layout, despite having Virtual Keycodes for them both.

I just checked, and alt / right alt are both assigned to VK_LMENU and VK_RMENU respectively, as per Microsoft's spec.

This has been a long standing issue and from what I can tell, Windows just treats 0xA4(LMENU) and 0xA5(RMENU) as 0x12(agnostic MENU) when using the United States language.

Switching my windows language to United Kingdom forces the alt keys to be recognized properly.

I believe this is a windows bug and or limitation, but I may be wrong.

information-redacted commented 8 months ago

It seems like Virtual Desktop's keyboard can send both at the same time - Seemingly, regardless of locale (currently English - United States). Not sure how, though. Will try the workaround for now^^