comparison include/SDL_keyboard.h @ 2129:047245361002

Key repeat is handled by the OS, since text input is now decoupled from physical key events.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 16 Jun 2007 15:32:04 +0000
parents c121d94672cb
children 4baee598306d
comparison
equal deleted inserted replaced
2128:04e9ad5318dc 2129:047245361002
91 * \note This translation has some overhead, so translation defaults off. 91 * \note This translation has some overhead, so translation defaults off.
92 */ 92 */
93 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable); 93 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
94 94
95 /** 95 /**
96 * \fn int SDL_EnableKeyRepeat(int delay, int interval)
97 *
98 * \brief Enable keyboard repeat for the selected keyboard.
99 *
100 * \param delay The initial delay in milliseconds between the time when a
101 * key is pressed and keyboard repeat begins. Setting a delay
102 * of 0 will disable keyboard repeat.
103 * \param interval The time in milliseconds between keyboard repeat events.
104 *
105 * \return 0 on success, or -1 if there was an error.
106 *
107 * \note Keyboard repeat defaults to off.
108 */
109 #define SDL_DEFAULT_REPEAT_DELAY 500
110 #define SDL_DEFAULT_REPEAT_INTERVAL 30
111 /**/
112 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
113
114 /**
115 * \fn void SDL_GetKeyRepeat(int *delay, int *interval)
116 *
117 * \brief Get the current keyboard repeat setting for the selected keyboard.
118 */
119 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
120
121 /**
122 * \fn Uint8 *SDL_GetKeyState(int *numkeys) 96 * \fn Uint8 *SDL_GetKeyState(int *numkeys)
123 * 97 *
124 * \brief Get a snapshot of the current state of the selected keyboard. 98 * \brief Get a snapshot of the current state of the selected keyboard.
125 * 99 *
126 * \return An array of keystates, indexed by the SDLK_* syms. 100 * \return An array of keystates, indexed by the SDLK_* syms.