Jump to content

Unicode Input Support.


reepblue
 Share

Recommended Posts

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.

  • Like 2

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

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

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. 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...