comparison src/video/x11/SDL_x11keyboard.c @ 2299:a7cbc25071b6

Enabled key board auto repeat in X11_InitKeyboard.c. Had to add a couple of new Xlib symbols.
author Bob Pendleton <bob@pendleton.com>
date Sat, 12 Jan 2008 18:07:06 +0000
parents 41d2599b7117
children fbe8ff44c519
comparison
equal deleted inserted replaced
2298:41d2599b7117 2299:a7cbc25071b6
849 SDLKey *foundTable; 849 SDLKey *foundTable;
850 int i; 850 int i;
851 int code; 851 int code;
852 SDLKey sdlkey; 852 SDLKey sdlkey;
853 853
854 XAutoRepeatOn(data->display);
855
854 /* A random collection of KeySym/SDLKey pairs that should be valid 856 /* A random collection of KeySym/SDLKey pairs that should be valid
855 in any keyboard layout (if this isn't the case on yours, 857 in any keyboard layout (if this isn't the case on yours,
856 please adjust). Using XKeysymToKeycode on these KeySyms 858 please adjust). Using XKeysymToKeycode on these KeySyms
857 creates a "fingerprint" of the X server's key-to-KeyCode 859 creates a "fingerprint" of the X server's key-to-KeyCode
858 mapping which is then matched against all our predefined 860 mapping which is then matched against all our predefined
902 #if 1 904 #if 1
903 fprintf(stderr, 905 fprintf(stderr,
904 "The key codes of your X server are unknown to SDL. Keys may not be recognized properly. To help get this fixed, report this to the SDL mailing list <sdl@libsdl.org> or to Christian Walther <cwalther@gmx.ch>.\n"); 906 "The key codes of your X server are unknown to SDL. Keys may not be recognized properly. To help get this fixed, report this to the SDL mailing list <sdl@libsdl.org> or to Christian Walther <cwalther@gmx.ch>.\n");
905 #endif 907 #endif
906 data->keyCodeToSDLKTable = 908 data->keyCodeToSDLKTable =
907 SDL_malloc(KeyCodeTableSize * sizeof(SDLKey)); 909 SDL_malloc(KeyCodeTableSize * sizeof(SDLKey));
908 if (data->keyCodeToSDLKTable == NULL) { 910 if (data->keyCodeToSDLKTable == NULL) {
909 SDL_OutOfMemory(); 911 SDL_OutOfMemory();
910 return -1; 912 return -1;
911 } 913 }
912 for (code = KeyCodeTableSize; code >= 0; code--) { 914 for (code = KeyCodeTableSize; code >= 0; code--) {