The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
TEXTINPUT & Return/Backspace
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
I notice that when SDL_TextInput is active, the appropriate event doesn't detect return or backspace being pressed - instead these keys generate a SDL_KEYDOWN event, which is rather odd. It's also a bit cumbersome as you need to detect character presses in two places.
TEXTINPUT & Return/Backspace
Sik


Joined: 26 Nov 2011
Posts: 905
That's normal, text input is only meant to handle characters being
added to the current input (i.e. whenever the user inserts text), for
anything else (enter, backspace, arrows, etc.) you're supposed to keep
using the normal keyboard input since it's not text.

2014-07-22 20:05 GMT-03:00, MrTAToad:
Quote:
I notice that when SDL_TextInput is active, the appropriate event doesn't
detect return or backspace being pressed - instead these keys generate a
SDL_KEYDOWN event, which is rather odd. It's also a bit cumbersome as you
need to detect character presses in two places.





_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
MrTAToad


Joined: 13 Feb 2014
Posts: 205
Location: Chichester, England
Ah, right - thanks for that.