gnif / LookingGlass

An extremely low latency KVMFR (KVM FrameRelay) implementation for guests with VGA PCI Passthrough.
GNU General Public License v2.0
4.72k stars 262 forks source link

Looking Glass client does not show correct keys in the tooltip if using non-QWERTY layout #1007

Closed Lissanro closed 2 years ago

Lissanro commented 2 years ago

My keyboard does not have Scroll Lock key, so I use right Ctrl instead, but I think it does not matter. When I press it in the Client, tooltip with shortcuts, but none of them work. For example to quit the shortcut in my case is Ctrl+Q, but nothing happens if press it. I have to press Ctrl+/ instead, then it works. I suspect this is because "/" in my layout in the same place as "Q" in QWERTY layout. The same is true for all other shortcuts.

gnif commented 2 years ago

Not a LG issue, we are using the standard linux key codes provided by the OS and not keyboard scan codes. Your OS is failing to map your keys to key-codes correctly.

Lissanro commented 2 years ago

I have no issues in any other applications though, Chrome, Firefox, VSCode and many others correctly display shortcuts and react to them as expected. My understanding is, LG client is using low-level keyboard codes instead, which are not supposed to be mapped to any keyboard layout (even though they may have internal name definition corresponding to QWERTY layout, but just for convinience), and if I try to report this as a bug to the OS developers, they will probably say this is not an OS issue, but bug in the application. But if you are 100% sure this is OS bug that needs to be reported elsewhere, please let me know.

gnif commented 2 years ago

I will review the code to be sure and let you know. LG uses xinput keyboard events and IIRC we are checking the key code not the scan code.

Lissanro commented 2 years ago

Thank you for looking into this.

gnif commented 2 years ago

Confirmed an issue, investigating a fix.