-
-
Notifications
You must be signed in to change notification settings - Fork 254
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
hexidecmial codes are incorrect. #364
Comments
The key codes have nothing to do with ASCII. Each key has an assigned code, which is defined by libuiohook. |
bewildering.... How do you add key modifiers then? Its all predefined and that's not good if you have key combinations with shift+d or shift+F1. You are stuck with predefined, not good at all. |
How would you represent keys like F1 as an ASCII character? The function you suggested would take the first character of the key name, so F1 through F12 would in this case turn into the ASCII code for 'F' and all use the same key code, which is obviously wrong. Since you'll need exceptions for all keys that can't be converted to ASCII you might as well just not use that system at all. Regardless, I didn't come up with the key codes, I'm just using a library which allows cross-platform global input hooking.
As of right now, you don't.
It doesn't have anything to do with the codes being "predefined", modifiers like shift or control are passed separately for each key event and as of right now they just aren't handled. See #73 |
convert it to binary and let it be represented by its F and 1 binary number. I'm not sure how things go in Cmake or what ever was used there, but if there's a way to turn "46 31" into "F1" there. JSON code: "46 31" instead of a predefined vc(F1,xxxx). Just an idea. If you need to include a modifier, same thing "ShiftRight" into binary and send on its way. I would probably either make the code value an array or new object for "modifier": "binary"
|
I don't think you understand what I'm saying. The input events are handled by this library. It sends inputs with these predefined key codes. There's no reason to use other key codes because they'd ultimately have to be converted back to the ones that libuiohook uses. |
Describe the bug
It appears that the hexidecmial codes are incorrect for the ASCII standard 8bit integer system.
To Reproduce
Click on any element to edit. Ensure record key is selected. Type a letter, for example "d".
Expected behavior
The expected behavior should be for it to record the correct ASCII hex code for the letter "d" as "0x64", however it inputs "0x20".
Screenshots
http://puu.sh/JOkJ9/94596b1320.png
Additional information:
vc.js
elements.js
line 228 add
vc = parseInt(vc,16)
will display the correct hexcodes for all modifiers and keys pressed including numpad.
this will fix the JSON file and it will ensure your preview is correct. This also fixes all modifier issues and keypad issues.
However, the actual plugin part for OBS will need modification. That's beyond me.
Additional context
https://en.wikipedia.org/wiki/ASCII
https://bytetool.web.app/en/ascii/
The text was updated successfully, but these errors were encountered: