univrsal / input-overlay

Show keyboard, gamepad and mouse input on stream
GNU General Public License v2.0
2.63k stars 235 forks source link

Unexpected Behavior with Custom QWERTZ Preset #377

Closed FatalBulletHit closed 6 months ago

FatalBulletHit commented 6 months ago

I created a custom QWERTZ preset with the help of io-cct and upon testing it in OBS I encountered a rather unexpected behavior - while io-cct highlights the correct keys, OBS does not:

https://youtu.be/I8QidWzqiMM (io-cct top, OBS overlay bottom)

Key Pressed io-cct OBS Overlay
- 0x0035 (VC_SLASH) 0x000c (VC_MINUS)
ß 0x000c (VC_MINUS) 0x001a (VC_OPEN_BRACKET)
Ü 0x001a (VC_OPEN_BRACKET) 0x0027 (VC_SEMICOLON)
Ö 0x0027 (VC_SEMICOLON) 0x0029 (VC_BACKQUOTE)
^ 0x0029 (VC_BACKQUOTE) 0x002b (VC_BACK_SLASH)
# 0x002b (VC_BACK_SLASH) 0x0035 (VC_SLASH)

To Reproduce Not sure, preset can be found here. Does the Windows keyboard layout settings have any effect on this?

Additional information:

univrsal commented 6 months ago

Yeah the mapping for some special keys isn't that straightforward. You'll have to manually enter the key codes for those keys for now.

FatalBulletHit commented 6 months ago

It's easy to work around, but why does io-cct and OBS differ when using the same exact config? Does OBS or the io-cct webtool interpret the key presses incorrectly? 🤔

univrsal commented 6 months ago

The inputs from the browser have to be converted to the keycodes that libuiohook uses, which is the library that input overlay uses for keyboard and mouse input, but there are inconsistencies between browsers, operating systems and keyboard layouts

FatalBulletHit commented 6 months ago

Ok, thanks for the explanation. 🙂