Print keysym with key events. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Wed, 13 Jun 2007 04:13:21 +0000
branchSDL-1.2
changeset 39563868bebb9f5b
parent 3955 40b6b5744e05
child 3957 b1d5b56aa549
Print keysym with key events.
test/threadwin.c
     1.1 --- a/test/threadwin.c	Sat Jun 09 19:52:05 2007 +0000
     1.2 +++ b/test/threadwin.c	Wed Jun 13 04:13:21 2007 +0000
     1.3 @@ -179,8 +179,9 @@
     1.4  			    /* We want to toggle visibility on buttonpress */
     1.5  			    case SDL_KEYDOWN:
     1.6  			    case SDL_KEYUP:
     1.7 -			    	printf("Key '%c' has been %s\n",
     1.8 +			    	printf("Key '%c' (keysym==%d) has been %s\n",
     1.9  						events[i].key.keysym.unicode,
    1.10 +						(int) events[i].key.keysym.sym,
    1.11  					(events[i].key.state == SDL_PRESSED) ?
    1.12  						"pressed" : "released");
    1.13