So, i’m trying to understand how does Unity saves in registry mapped controls/keyboard keys.
Like, I have an action “KeyQuickCast_h2803558386”, mapped in-game to “Right Arrow” but the registry entry shows HEX value 0x00000054 (DEC 84) which does not make sense. It does not match nor Windows keycode, nor BIOS one, no LANGcode nor VK_code.
Can someone solve the mystery to me
I would imagine it’s the value in the KeyCode enumeration.
I’m trying to find out the enum tables or something. Code snippets itself won’t help me, clearly Unity is too unique to use windows keycodes like everyone else.
Well, cross platform and all that. Phones, consoles, tablets, televisions, and so on. Many don’t even keyboards. Best to think things through before being too snarky.
In Visual Studio you can right click on the KeyCode enum and “go to definition”. That should show you the values of each of the enums. If not you can use an IL decompiler such as ILSpy to find the values.
And the question must be asked, why are you bothering? The values are an implementation detail and largely irrelevant.
1 Like
I found relevant thread:
Do you by any chance know if there is a table Unity uses for that/references?
I just don’t know what the standard is. The standard obvsly borrows from ASCII, but it’s not full ASCII as there are several keys that aren’t represented in ASCII.
If we could find the standard, (SDL 1.2 having it as well could be a hint to what it is), then we could possibly find an already written algorithm to convert them.