SDL-mirror/test
Sam Lantinga f0da180be1 Date: Thu, 05 Jul 2007 14:02:33 -0700
From: Sam Lantinga
Subject: SDL 1.3 keyboard plan

After lots of discussion with Christian, this is what we came up with:

> So, to sum up...
> SDLK_* become the physical keys, starting at > (1<<21)
> We create a macro SDLK_INDEX(X)
> We have two functions SDL_GetLayoutKey(SDLKey) and SDL_GetKeyName()
> SDL_GetLayoutKey maps to UCS4 for printable characters, and SDLK* for
  non-printable characters
> and does so based on the OS's current keyboard layout
> SDL_GetKeyName() handles both SDLK_* and UCS4, converting UCS4 to UTF-8 and
  converting SDLK_* into our names, which are UTF-8 for printable characters.
> WASD folks use SDLK_*, and 'I' folks use SDL_GetLayoutKey(SDLK_*)

Here is the patch he came up with, and his e-mail about it:

Date: Fri, 17 Aug 2007 19:50:28 +0200
From: Christian Walther
Subject: Re: SDL 1.3 keyboard plan

> Sounds great, go ahead and send me a patch.

Here goes! Thanks for having a look. Don't hesitate to comment if
anything does not conform to your ideas.

One caveat: Committing this now may break compilability of some video
drivers - specifically, if they use any of the SDLK_* codes that were
obsoleted and moved into SDL_compat.h. I only tried Cocoa (which did
break, but is already fixed) and X11 (which didn't, but then its key
handling is #iffed out). If that's a problem, it may need to go into
a branch.

  -Christian

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402630
2007-08-19 14:52:52 +00:00
..
.gdbinit Initial revision 2001-04-26 16:45:43 +00:00
acinclude.m4 Don't add NONE/bin to the path - inexplicably fixes building on mingw+msys, apparently 2006-05-01 07:23:46 +00:00
autogen.sh Added yet another variant of autoconf to the list 2006-05-15 06:39:10 +00:00
checkkeys.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
common.c Date: Thu, 05 Jul 2007 14:02:33 -0700 2007-08-19 14:52:52 +00:00
common.h Implemented Cocoa window support 2006-07-24 05:03:02 +00:00
configure.in Merged change from 1.2 to add X11 path for OpenGL detection 2007-06-30 08:11:02 +00:00
COPYING Updated the source with the correct e-mail address 2001-12-14 12:38:15 +00:00
gcc-fat.sh Fat test programs! :) 2006-05-09 16:10:04 +00:00
graywin.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
icon.bmp Switched data files to binary format 2003-11-24 00:21:24 +00:00
loopwave.c Visual C++ compiler warning fixes 2007-07-12 06:53:20 +00:00
Makefile.in Merged r2899:2900 from SDL-1.2 branch to trunk: testloadso program. 2006-11-07 14:36:47 +00:00
moose.dat Date: Mon, 28 Jul 2003 18:30:50 +0300 2003-08-08 21:31:18 +00:00
picture.xbm Initial revision 2001-04-26 16:45:43 +00:00
README Alpha sort the test list, add missing ones, remove removed ones 2007-01-05 19:12:50 +00:00
sail.bmp Switched data files to binary format 2003-11-24 00:21:24 +00:00
sample.bmp Switched data files to binary format 2003-11-24 00:21:24 +00:00
sample.wav Switched data files to binary format 2003-11-24 00:21:24 +00:00
testalpha.c Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
testaudioinfo.c indent is evil 2006-10-28 16:48:03 +00:00
testbitmap.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testblitspeed.c Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
testcdrom.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testcursor.c Merged r2960:2961 from branches/SDL-1.2...free all cursors in test/testcursor.c 2007-02-13 09:21:38 +00:00
testdyngl.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testerror.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testfile.c Merged r2999:3000 from branches/SDL-1.2: Visual Studio compilation fix. 2007-03-30 06:30:14 +00:00
testgamma.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testgl.c Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
testgl2.c indent 2007-08-12 16:26:10 +00:00
testhread.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testiconv.c Fix for bug #447 merged from SDL 1.2 2007-07-04 08:01:04 +00:00
testjoystick.c indent 2007-07-15 21:53:51 +00:00
testkeys.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testloadso.c make indent 2007-06-14 13:21:29 +00:00
testlock.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testmultiaudio.c Replaced a few memset/memcpy calls with SDL_memset/SDL_memcpy. 2007-07-05 02:47:54 +00:00
testoverlay.c Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
testoverlay2.c Okay, still some bugs, but everything builds again... 2007-08-18 05:39:09 +00:00
testpalette.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testplatform.c Removed AmigaOS code for 1.3 branch. 2006-10-29 04:09:17 +00:00
testsem.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testsprite.c The Mac OS X Cocoa video driver is under construction... 2006-07-23 09:11:10 +00:00
testsprite2.c Emphasized the separation between SDL_Surface and SDL_Texture 2007-08-11 20:54:31 +00:00
testtimer.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testver.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testvidinfo.c In general, fill in pointers to structures, rather than return them. 2006-08-05 22:34:23 +00:00
testwin.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
testwm.c This code adds support for DirectColor visuals to SDL 1.3. The support uses part of the Xmu library. To ensure that the library is 2007-07-12 20:00:50 +00:00
testwm2.c Added source color and alpha modulation support. 2006-08-28 03:17:39 +00:00
threadwin.c Merged r3059:3060 from branches/SDL-1.2: output key event's keysym. 2007-06-13 06:05:39 +00:00
torturethread.c SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00
utf8.txt Updated by Ryan Gordon 2006-03-13 16:56:01 +00:00

These are test programs for the SDL library:

	checkkeys	Watch the key events to check the keyboard
	graywin		Display a gray gradient and center mouse on spacebar
	loopwave	Audio test -- loop playing a WAV file
	testalpha	Display an alpha faded icon -- paint with mouse
	testaudioinfo	Lists audio device capabilities
	testbitmap	Test displaying 1-bit bitmaps
	testblitspeed	Tests performance of SDL's blitters and converters.
	testcdrom	Sample audio CD control program
	testcursor	Tests custom mouse cursor
	testdyngl	Tests dynamically loading OpenGL library
	testerror	Tests multi-threaded error handling
	testfile	Tests RWops layer
	testgamma	Tests video device gamma ramp
	testgl		A very simple example of using OpenGL with SDL
	testgl2		Improved version of testgl
	testhread	Hacked up test of multi-threading
	testiconv	Tests international string conversion
	testjoystick	List joysticks and watch joystick events
	testkeys	List the available keyboard keys
	testloadso	Tests the loadable library layer
	testlock	Hacked up test of multi-threading and locking
	testmultiaudio	Tests using several audio devices
	testoverlay	Tests the software/hardware overlay functionality.
	testoverlay2	Tests the overlay flickering/scaling during playback.
	testpalette	Tests palette color cycling
	testplatform	Tests types, endianness and cpu capabilities
	testsem		Tests SDL's semaphore implementation
	testsprite	Example of fast sprite movement on the screen
	testsprite2	Improved version of testsprite
	testtimer	Test the timer facilities
	testver		Check the version and dynamic loading and endianness
	testvidinfo	Show the pixel format of the display and perfom the benchmark
	testwin		Display a BMP image at various depths
	testwm		Test window manager -- title, icon, events
	testwm2		Improved version of testwm
	threadwin	Test multi-threaded event handling
	torturethread	Simple test for thread creation/destruction