11-12-2012 12:36 PM
Hello,
is there any way of translating the keyboard codes obtained from keyboard events as text?
To be more clear, at some point, once we have a virtual keyboard running, this gets called:
screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_KEY_SYM, &key_val);
And we get a key_val which is one of the roughly 300 values defined in keycodes.h. If I want to show this as text in a custom label, is there any simple way of converting a key_val or buffer of them into an ansii string?
Internally it must be done somehow, as there are default textboxes where the keyboard just "works".
I could always settup a parsing system that converted every key, and put the accents, special symbols, interpreted the shift key, the back key and so on,but it seems a lot of work to go through just to let the player put his name in.
Any solutions?
Thanks,
Jaime