Minimal implementation of textinput events for x11. It only works for latin-1.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402709
This commit is contained in:
parent
05ad8bbf51
commit
79041b0a87
6 changed files with 38 additions and 11 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue