1.1 --- a/test/checkkeys.c Fri Aug 11 10:21:19 2017 -0700
1.2 +++ b/test/checkkeys.c Fri Aug 11 10:32:47 2017 -0700
1.3 @@ -168,7 +168,19 @@
1.4 PrintText("INPUT", event.text.text);
1.5 break;
1.6 case SDL_MOUSEBUTTONDOWN:
1.7 - /* Any button press quits the app... */
1.8 + /* Left button quits the app, other buttons toggles text input */
1.9 + if (event.button.button == SDL_BUTTON_LEFT) {
1.10 + done = 1;
1.11 + } else {
1.12 + if (SDL_IsTextInputActive()) {
1.13 + SDL_Log("Stopping text input\n");
1.14 + SDL_StopTextInput();
1.15 + } else {
1.16 + SDL_Log("Starting text input\n");
1.17 + SDL_StartTextInput();
1.18 + }
1.19 + }
1.20 + break;
1.21 case SDL_QUIT:
1.22 done = 1;
1.23 break;