Skip to content

Commit

Permalink
Print keysym with key events.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jun 13, 2007
1 parent f9a7a99 commit b776f52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/threadwin.c
Expand Up @@ -179,8 +179,9 @@ int SDLCALL HandleKeyboard(void *unused)
/* We want to toggle visibility on buttonpress */
case SDL_KEYDOWN:
case SDL_KEYUP:
printf("Key '%c' has been %s\n",
printf("Key '%c' (keysym==%d) has been %s\n",
events[i].key.keysym.unicode,
(int) events[i].key.keysym.sym,
(events[i].key.state == SDL_PRESSED) ?
"pressed" : "released");

Expand Down

0 comments on commit b776f52

Please sign in to comment.