debauchee / barrier

Open-source KVM software
Other
27.61k stars 1.52k forks source link

Unexpected punctuation characters are emitted when client keyboard layout is not English #1119

Open MadaraUchiha opened 3 years ago

MadaraUchiha commented 3 years ago

Describe the bug When the target keyboard layout is set to a layout that doesn't match the host (in my case, QWERTY English), characters like , . / ' are emitted instead of the target layout character in that position.

For example, when the keyboard layout is set to Hebrew, pressing the key that in English layout would be , should cause the character ת to be emitted, instead, , is emitted.

To Reproduce

Steps to reproduce the behavior:

  1. Setup a normal session
  2. Enable Hebrew layout for the client
  3. Set client layout to Hebrew
  4. Open any text editor
  5. Press the , key

Expected behavior The client should type ת onto the text editor.

Actual behavior The client types , onto the text editor.

Screenshots N/A

Desktop (please complete the following information):

Additional context

In the case of the Hebrew layout (but probably in other layouts as well), the punctuation keys are laid out differently, for example, to type , in Hebrew, you'd press the key in the QWERTY layout position of ', to type . you'd hit / and so on. Since these keys appear in both layout (albeit in different positions), the original English characters are emitted.

Hebrew characters (i.e. those that don't appear in the English QWERTY layout) work fine, you type m and get צ as expected, for instance.

Attached is an image of a Hebrew keyboard with the keys marked, for illustration image

Related: #724 #860

abutbul commented 3 years ago

Some info: This does reproduce in Windows 10 but does not in Linux (Ubuntu 20.04 for example). I have been trying to find keyboard layouts in Windows which will not send , instead of ת but so far none have proven to work.