mirror of
https://github.com/yawut/SDL.git
synced 2026-09-08 17:16:19 -05:00
Minimal implementation of textinput events for x11. It only works for latin-1.
This commit is contained in:
@@ -89,6 +89,11 @@ PrintKey(SDL_keysym * sym, int pressed)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void
|
||||
PrintText(char *text)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
@@ -139,6 +144,9 @@ main(int argc, char *argv[])
|
||||
case SDL_KEYUP:
|
||||
PrintKey(&event.key.keysym, 0);
|
||||
break;
|
||||
case SDL_TEXTINPUT:
|
||||
PrintText(event.text.text);
|
||||
break;
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
/* Any button press quits the app... */
|
||||
case SDL_QUIT:
|
||||
|
||||
Reference in New Issue
Block a user