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
SDL2 Android not receiving keyboard events (numbers/letters)
maartenengels


Joined: 09 Jun 2015
Posts: 11
I have ported an application to Android using the SDL Android template project that comes with the source code.

Unfortunately after building and running the application, I found out that it doesn't receive Keyboard Events for numbers/letters. Although it does reiceve Keyboard Events for 'BACKSPACE', 'ENTER', 'SHIFT' and etc.

Although I cannot debug my C++ code, I backtracked the incoming keyboard events back to the function :

Code:
public boolean sendKeyEvent(KeyEvent event)


In the class SDLInputConnection that extends BaseInputConnection.

Am I missing something? Where do I go wrong?
maartenengels


Joined: 09 Jun 2015
Posts: 11
So input from software-keyboard on SDL-Android template project is interpreted as TextInput. So to catch the poll event you have to include an SDL_TEXTINPUT case.