Static key to char map?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
cat.exe
Posts: 34
Joined: Sat Sep 14, 2013 11:52 pm

Static key to char map?

Post by cat.exe »

I was just wondering, what's the easiest way to get the EKEY_CODE given a charsequence or string that represents that character (i.e. turn 'e' into KEY_KEY_E)? I could always make a static map myself, but that would be huge and would probably contain holes with my code quality :D

Does Irrlicht provide a way to do this, or will I have to map it myself?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Static key to char map?

Post by CuteAlien »

You'll have to go with your own map. It's somewhat unusual going in that direction.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
cat.exe
Posts: 34
Joined: Sat Sep 14, 2013 11:52 pm

Re: Static key to char map?

Post by cat.exe »

Okay. Nice to know that, since it's hard to search an api for something that may or may not exist. I might write my own map, or figure an alternative.
Post Reply