input-overlay icon indicating copy to clipboard operation
input-overlay copied to clipboard

Issue regarding Arrow Keys

Open Grt-sc opened this issue 3 years ago • 16 comments

Arrow keys, when assigned in the io-cct tool work properly, but once imported as a .JSON file into OBS incorrectly read as the NUMPAD arrow keys rather than the regular arrow keys.

To Reproduce Steps to reproduce the behavior: using a pre-existing overlay, attempt to assign anything to any of the arrow keys by having it read the arrow keys as inputs. test to verify it works in io-cct, then import into OBS Studio

Expected behavior buttons to function when regular arrow keys are pressed.

Additional information:

  • Plugin version: 5.0.0
  • Full OBS Studio log https://obsproject.com/logs/RnAtUf4ztS3eG69i

Grt-sc avatar May 20 '21 01:05 Grt-sc

I have a (potentially) similar issue with the Delete, Home, Page Up, Page Down, and arrow keys. I say potentially cus I'm using a 65% keyboard and I can't tell if OBS is failing to detect the press or they are being registered as something else like in your case.

Oh and all of these are correctly being registered in io-cct.

DrakePHOSE avatar May 30 '21 03:05 DrakePHOSE

It's any of the scan codes that are a two byte sequence. Arrow keys, Insert, Home, Page Up/Down etc. are all prefixed with 0xE0 on Windows.

The io-cct tool generates the decimal equivalent of 0x0Enn in the json file. I tried the decimal equivalent of 0xE0nn but that didn't work either.

Edit: solved by using 0xEEnn as per https://github.com/kwhat/libuiohook/issues/96

ZXGuesser avatar Jun 05 '21 17:06 ZXGuesser

It's any of the scan codes that are a two byte sequence. Arrow keys, Insert, Home, Page Up/Down etc. are all prefixed with 0xE0 on Windows.

The io-cct tool generates the decimal equivalent of 0x0Enn in the json file. I tried the decimal equivalent of 0xE0nn but that didn't work either.

Edit: solved by using 0xEEnn as per kwhat/libuiohook#96

I changed 0xE0nn to 0xEEnn through io-cct but it didn't work, then i tried 0xEE0nn and still didn't work, did i misinterpretate your solution? With "nn" you mean the two digits numeric or alphanumeric value, right?

TnkFranco010 avatar Jun 29 '21 17:06 TnkFranco010

It's any of the scan codes that are a two byte sequence. Arrow keys, Insert, Home, Page Up/Down etc. are all prefixed with 0xE0 on Windows. The io-cct tool generates the decimal equivalent of 0x0Enn in the json file. I tried the decimal equivalent of 0xE0nn but that didn't work either. Edit: solved by using 0xEEnn as per kwhat/libuiohook#96

I changed 0xE0nn to 0xEEnn through io-cct but it didn't work, then i tried 0xEE0nn and still didn't work, did i misinterpretate your solution? With "nn" you mean the two digits numeric or alphanumeric value, right?

I had problems with changing it through io-cct too (i couldn't get rid of the 0 after the x), so I changed the decimal numbers in the json file directly with a Notepad. So the UP, LEFT, RIGHT, DOWN keys in the io-cct are mapped as 0xE048, 0xE04B, 0xE04D, 0xE050 respectively in hexadecimals, so they're 57416, 57419, 57421, 57424 respectively in decimals. Problem is that in OBS these values are for the NumPad arrows. The real Arrow Keys are mapped 0xEE48, 0xEE4B, 0xEE4D, 0xEE50 respectively in hexadecimals, therefore they're 61000, 61003, 61005, 61008 respectively in decimals. So you just open the json file, that you created via io-cct, with a simple Notepad and you change those decimals to the right ones. Sorry for over-explaining, just wanted to be clear enough about the whole issue for anyone that might read it later.

EluxRed avatar Aug 11 '21 23:08 EluxRed

It's any of the scan codes that are a two byte sequence. Arrow keys, Insert, Home, Page Up/Down etc. are all prefixed with 0xE0 on Windows. The io-cct tool generates the decimal equivalent of 0x0Enn in the json file. I tried the decimal equivalent of 0xE0nn but that didn't work either. Edit: solved by using 0xEEnn as per kwhat/libuiohook#96

I changed 0xE0nn to 0xEEnn through io-cct but it didn't work, then i tried 0xEE0nn and still didn't work, did i misinterpretate your solution? With "nn" you mean the two digits numeric or alphanumeric value, right?

I had problems with changing it through io-cct too (i couldn't get rid of the 0 after the x), so I changed the decimal numbers in the json file directly with a Notepad. So the UP, LEFT, RIGHT, DOWN keys in the io-cct are mapped as 0xE048, 0xE04B, 0xE04D, 0xE050 respectively in hexadecimals, so they're 57416, 57419, 57421, 57424 respectively in decimals. Problem is that in OBS these values are for the NumPad arrows. The real Arrow Keys are mapped 0xEE48, 0xEE4B, 0xEE4D, 0xEE50 respectively in hexadecimals, therefore they're 61000, 61003, 61005, 61008 respectively in decimals. So you just open the json file, that you created via io-cct, with a simple Notepad and you change those decimals to the right ones. Sorry for over-explaining, just wanted to be clear enough about the whole issue for anyone that might read it later.

Ok that worked for the arrow keys but what would be the decimals of Delete, Home, Page Up, Page Down?

DrakePHOSE avatar Aug 12 '21 00:08 DrakePHOSE

It's any of the scan codes that are a two byte sequence. Arrow keys, Insert, Home, Page Up/Down etc. are all prefixed with 0xE0 on Windows. The io-cct tool generates the decimal equivalent of 0x0Enn in the json file. I tried the decimal equivalent of 0xE0nn but that didn't work either. Edit: solved by using 0xEEnn as per kwhat/libuiohook#96

I changed 0xE0nn to 0xEEnn through io-cct but it didn't work, then i tried 0xEE0nn and still didn't work, did i misinterpretate your solution? With "nn" you mean the two digits numeric or alphanumeric value, right?

I had problems with changing it through io-cct too (i couldn't get rid of the 0 after the x), so I changed the decimal numbers in the json file directly with a Notepad. So the UP, LEFT, RIGHT, DOWN keys in the io-cct are mapped as 0xE048, 0xE04B, 0xE04D, 0xE050 respectively in hexadecimals, so they're 57416, 57419, 57421, 57424 respectively in decimals. Problem is that in OBS these values are for the NumPad arrows. The real Arrow Keys are mapped 0xEE48, 0xEE4B, 0xEE4D, 0xEE50 respectively in hexadecimals, therefore they're 61000, 61003, 61005, 61008 respectively in decimals. So you just open the json file, that you created via io-cct, with a simple Notepad and you change those decimals to the right ones. Sorry for over-explaining, just wanted to be clear enough about the whole issue for anyone that might read it later.

Ok that worked for the arrow keys but what would be the decimals of Delete, Home, Page Up, Page Down?

No idea, we would need to figure out the right numbers for those somehow... Could be worth trying out the numbers adjacent to these: 57416, 57419, 57421, 57424, since they're on the NumPad as well. One thing though (seems kind of obvious but needs to be said): having Block Num off matters

EluxRed avatar Aug 12 '21 11:08 EluxRed

Insert = 61010 Delete = 61011 Home = 60999 End = 61007 PageUp = 61001 PageDown = 61009

Some things I never found a solution for, such as `, ', #, and \ all give the wrong scan codes on my keyboard layout, which I understand is an issue with the underlying libuihook library.

ZXGuesser avatar Aug 12 '21 12:08 ZXGuesser

Those work. Thank you so much. <3

DrakePHOSE avatar Aug 12 '21 22:08 DrakePHOSE

Having the same issue for the arrow keys and the solution above unfornately do not work. I'm currently on Linux Manjaro 21.0.

sorae42 avatar Aug 23 '21 07:08 sorae42

It's any of the scan codes that are a two byte sequence. Arrow keys, Insert, Home, Page Up/Down etc. are all prefixed with 0xE0 on Windows. The io-cct tool generates the decimal equivalent of 0x0Enn in the json file. I tried the decimal equivalent of 0xE0nn but that didn't work either. Edit: solved by using 0xEEnn as per kwhat/libuiohook#96

I changed 0xE0nn to 0xEEnn through io-cct but it didn't work, then i tried 0xEE0nn and still didn't work, did i misinterpretate your solution? With "nn" you mean the two digits numeric or alphanumeric value, right?

I had problems with changing it through io-cct too (i couldn't get rid of the 0 after the x), so I changed the decimal numbers in the json file directly with a Notepad. So the UP, LEFT, RIGHT, DOWN keys in the io-cct are mapped as 0xE048, 0xE04B, 0xE04D, 0xE050 respectively in hexadecimals, so they're 57416, 57419, 57421, 57424 respectively in decimals. Problem is that in OBS these values are for the NumPad arrows. The real Arrow Keys are mapped 0xEE48, 0xEE4B, 0xEE4D, 0xEE50 respectively in hexadecimals, therefore they're 61000, 61003, 61005, 61008 respectively in decimals. So you just open the json file, that you created via io-cct, with a simple Notepad and you change those decimals to the right ones. Sorry for over-explaining, just wanted to be clear enough about the whole issue for anyone that might read it later.

didnt quite work, sittin here on ubuntu and i have no idea how to figure out what the keys are

Redd56 avatar Dec 16 '21 08:12 Redd56

update: i have checked nearly every place i can think on both this project and libuio and tried every key and still no luck

Redd56 avatar Dec 16 '21 10:12 Redd56

I also can't get the arrow keys to work, would really like to move to v5.0 already but this is preventing me from doing so

treierxyz avatar Dec 19 '21 13:12 treierxyz

Ubuntu 20.04.3 LTS, neither 0xE04D nor 0xEE4D work for RightArrow, but 0xEE4D does correspond to NumRightArrow.

Electrollama avatar Jan 17 '22 10:01 Electrollama

I also could not get the arrow keys to work. OBS 27.1.3 (64 bit). Input overlay version 5.0.0 rc1. The fix suggested by EluxRed did not work for me.

crazyzimuki avatar Feb 08 '22 23:02 crazyzimuki

image Here's me spamming up down left right on Ubuntu 20.04 running wscat on the builtin websocket server Here's a config that seems to work for me (right arrow oddly has key code 0) image So Up -> 3639 Left -> 3640 Right -> 0 Down -> 3676 Not sure if setting right key as keycode 0 will cause side effects.

javaarchive avatar Apr 08 '22 18:04 javaarchive

The right arrow being 0 is a bug with libuihook. I think it's already been fixed, but I'll have to make a new build with the new library version first.

univrsal avatar Apr 10 '22 12:04 univrsal

See #298 for further tracking

univrsal avatar Dec 06 '22 19:12 univrsal