reepblue Posted September 3, 2022 Share Posted September 3, 2022 With Cyclone, I was getting complaints about how people with non US-EN keyboards couldn't bind some of their keys. While my input system supported rebinding of actions, it couldn't read things like arrow keys on those keyboards. Could UltraEngine magically convert the input to use unicode for us like SDL2 does? This way KEY_E is ALWAYS the E key no matter what keyboard we're using. 2 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted September 6, 2022 Share Posted September 6, 2022 There is a KEYCHAR event that contains the character for the pressed key. However, I don't think that would provide any information when an arrow key is pressed. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted September 6, 2022 Author Share Posted September 6, 2022 I have looked into this more. Apparently things like the Source Engine and SDL2 make a virtual keyboard and the end user or the input manager uses that value instead of the raw input. This includes arrow keys and all. I'm planning on installing more keyboard layouts to Windows and using the onscreen keyboard to test this and I would really hate to rely on another library for this functionality. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Josh Posted September 6, 2022 Share Posted September 6, 2022 Well, yeah, that's exactly what the KEY_WHATEVER values are. I just don't know what an arrow key is on a French keyboard, on Windows, Linux, and Mac. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted September 6, 2022 Author Share Posted September 6, 2022 I have only feedback I got were from those using a Cyrillic keyboard. A customer from Spain mentioned they just set their layout to the English QWERTY layout and everything is fine. There's also a disparity between lower case and upper case characters. For example, Leadwerks and Ultra always see the E key as 69, no matter if it's a capital e or lowercase E. SDL2 on the other hand only uses the 69 value for that key only if shift/capslock is active. If you have a chance, I guess you can take a gander at SDL's source code as a reference. I'm in the middle of reorganizing my setup but I plan to send time researching and experimenting this. I think I'll start with installing the Cyrillic keyboard layout and build a test app with SDL to see if it'll automatically fix this problem. Then it's just a matter of figuring out how it works within the library. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.