StreamController / OSPlugin

GNU General Public License v3.0
3 stars 0 forks source link

BUG Non-QWERTY keyboards type text incorrectly #11

Open Jestzer opened 1 week ago

Jestzer commented 1 week ago

Describe the bug If a non-QWERTY keyboard is used and typing action is performed by pressing a button, it types out the text as if a QWERTY keyboard was being used. For example, if you're using an AZERTY keyboard layout, A, Z, Q, W (and probably some others I've forgotten) are swapped.

To Reproduce Steps to reproduce the behavior:

  1. Have your system use a non-QWERTY keyboard. This is most noticeable with a very different layout, such as Dvorak.
  2. Press a button that performs a typing action.
  3. The text is typed out with incorrect characters if they are in a different spot than a QWERTY keyboard.

Additional context I can use xinput -list in combination with setxkbmap -device <id #> -layout us to workaround this issue, but it would be nice if I didn't have to do this each time I launched the program. I found out about this workaround from this.

Core447 commented 1 week ago

Ok, I hope I can fix this soon, just have to find a nice way to do this, because I'm using gtk for recording the inputs, but evdev to emulate them, so I need a good way to map them between the two while respecting the current layout.

Core447 commented 6 days ago

I tested this now and it seems that only the labels in the hotkey recorder show the wrong key, but the right buttons get emulated. The "Write Text" action works as expected. Is this the same case for you?

Jestzer commented 5 days ago

I'm not quite sure I follow. I'm currently using the Dvorak keyboard layout and regardless of the label, if I don't use the workaround described in my OP, it outputs mismatching text. In the example below, "c=parcluster;" should've have been entered into Terminal.

image

Core447 commented 4 days ago

My bad sorry. I'm looking for a way to solve this, but I'm not sure yet how to get the matching keycode of a character for the selected layout...

Jestzer commented 4 days ago

No worries, thanks for looking into it!