Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Less/greater/backslash" key on ISO 105-key Nordic layout not detected on Linux. #378

Open
Kile-Asmussen opened this issue Dec 31, 2023 · 5 comments

Comments

@Kile-Asmussen
Copy link

Platform:

Linux-compatible (NixOS), Firefox

Bug Description:

Input Overlay fails to register presses to the 105th key on Nordic layout 105-key ISO keyboards. (That's the less than/greater than/backslash key located between Right Shift and Z. It is prime keyboard real-estate for gaming.)

IO-CCT on Firefox, claims the keycode is 0xE46 = 3654, which isn't to my knowledge a valid (SDL2) keyboard scancode. In the IO-CCT user interface, this binding does work correctly, but it does not work in OBS.

Having read the SDL2 source code, I have tried manually entering the following code values: 49, 50, 100.

According to the command showkeys which prints scancodes to terminal as they're pressed, (and is otherwise consistent with IO-CCT,) the scancode for this key is 86. Manually entering this value in the JSON configuratiion also does not work.

Reproduction instructions:

On Linux, with Firefox

  1. Have a 105 key nordic keyboard.
  2. Open IO-CCT and create a new keyboard overlay.
  3. Program a key to be the <>\ key located between right shift and Z.
  4. Key overlay should correctly indicate in IO-CCT.
  5. Import overlay into OBS.
  6. Key overlay does not correctly indicate in OBS.

Expected behavior:

Key overlay should work the same in IO-CCT and OBS.

Additional information:

@univrsal
Copy link
Owner

Input overlay does not use sdl2 for keyboard input, it uses libuiohook.
There seem to be two issues here. Firefox reports the key as either "Backslash" or "Comma" when using QWERTY or QWERTZ. It should be reported as "IntlBackslash" which is what Chromium does. The other issue is that the keycode is supposed to be 0x0E46 as per uihook.h, but it's not mapped for linux. I've pushed a fix that defines it for linux, but I can't do much about the issues with firefox as both "Backslash" and "Comma" are incorrect and I don't see a way to distinguish it from the actual backslash and comma keys.

@Kile-Asmussen
Copy link
Author

@univrsal Thank you so much for looking into this so quickly. It would seem then that Firefox works exactly the same as Chromium actually, and both of them correctly specifies the <>\ key as 0xE46, no issue there. I just found it intuitively to look like a problem, but it is intended behavior.

When the fix has been released, I'll look into getting it into the Nix package.

@univrsal
Copy link
Owner

univrsal commented Jan 1, 2024

It would seem then that Firefox works exactly the same as Chromium actually, and both of them correctly specifies the <>\ key as 0xE46, no issue there.

That's strange. So if you press the key on this, what does the code column show?

Currently the fix is just pushed to master, do you need a new version to be released for the package?

@Kile-Asmussen
Copy link
Author

image

@univrsal
Copy link
Owner

univrsal commented Jan 2, 2024

That looks correct, never mind then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants