SDL
2.0
|
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_keycode.h"
#include "SDL_video.h"
#include "begin_code.h"
#include "close_code.h"
Go to the source code of this file.
Data Structures | |
struct | SDL_Keysym |
The SDL keysym structure, used in key events. More... | |
Functions | |
SDL_Window * | SDL_GetKeyboardFocus (void) |
Get the window which currently has keyboard focus. More... | |
const Uint8 * | SDL_GetKeyboardState (int *numkeys) |
Get a snapshot of the current state of the keyboard. More... | |
SDL_Keymod | SDL_GetModState (void) |
Get the current key modifier state for the keyboard. More... | |
void | SDL_SetModState (SDL_Keymod modstate) |
Set the current key modifier state for the keyboard. More... | |
SDL_Keycode | SDL_GetKeyFromScancode (SDL_Scancode scancode) |
Get the key code corresponding to the given scancode according to the current keyboard layout. More... | |
SDL_Scancode | SDL_GetScancodeFromKey (SDL_Keycode key) |
Get the scancode corresponding to the given key code according to the current keyboard layout. More... | |
const char * | SDL_GetScancodeName (SDL_Scancode scancode) |
Get a human-readable name for a scancode. More... | |
SDL_Scancode | SDL_GetScancodeFromName (const char *name) |
Get a scancode from a human-readable name. More... | |
const char * | SDL_GetKeyName (SDL_Keycode key) |
Get a human-readable name for a key. More... | |
SDL_Keycode | SDL_GetKeyFromName (const char *name) |
Get a key code from a human-readable name. More... | |
void | SDL_StartTextInput (void) |
Start accepting Unicode text input events. This function will show the on-screen keyboard if supported. More... | |
SDL_bool | SDL_IsTextInputActive (void) |
Return whether or not Unicode text input events are enabled. More... | |
void | SDL_StopTextInput (void) |
Stop receiving any text input events. This function will hide the on-screen keyboard if supported. More... | |
void | SDL_SetTextInputRect (SDL_Rect *rect) |
Set the rectangle used to type Unicode text inputs. This is used as a hint for IME and on-screen keyboard placement. More... | |
SDL_bool | SDL_HasScreenKeyboardSupport (void) |
Returns whether the platform has some screen keyboard support. More... | |
SDL_bool | SDL_IsScreenKeyboardShown (SDL_Window *window) |
Returns whether the screen keyboard is shown for given window. More... | |
Include file for SDL keyboard event handling
Definition in file SDL_keyboard.h.
SDL_Window* SDL_GetKeyboardFocus | ( | void | ) |
Get the window which currently has keyboard focus.
const Uint8* SDL_GetKeyboardState | ( | int * | numkeys | ) |
Get a snapshot of the current state of the keyboard.
numkeys | if non-NULL, receives the length of the returned array. |
Example:
SDL_Keycode SDL_GetKeyFromName | ( | const char * | name | ) |
Get a key code from a human-readable name.
SDL_Keycode SDL_GetKeyFromScancode | ( | SDL_Scancode | scancode | ) |
Get the key code corresponding to the given scancode according to the current keyboard layout.
See SDL_Keycode for details.
const char* SDL_GetKeyName | ( | SDL_Keycode | key | ) |
Get a human-readable name for a key.
SDL_Keymod SDL_GetModState | ( | void | ) |
Get the current key modifier state for the keyboard.
SDL_Scancode SDL_GetScancodeFromKey | ( | SDL_Keycode | key | ) |
Get the scancode corresponding to the given key code according to the current keyboard layout.
See SDL_Scancode for details.
SDL_Scancode SDL_GetScancodeFromName | ( | const char * | name | ) |
Get a scancode from a human-readable name.
const char* SDL_GetScancodeName | ( | SDL_Scancode | scancode | ) |
Get a human-readable name for a scancode.
SDL_bool SDL_HasScreenKeyboardSupport | ( | void | ) |
Returns whether the platform has some screen keyboard support.
SDL_bool SDL_IsScreenKeyboardShown | ( | SDL_Window * | window | ) |
Returns whether the screen keyboard is shown for given window.
window | The window for which screen keyboard should be queried. |
SDL_bool SDL_IsTextInputActive | ( | void | ) |
Return whether or not Unicode text input events are enabled.
void SDL_SetModState | ( | SDL_Keymod | modstate | ) |
Set the current key modifier state for the keyboard.
void SDL_SetTextInputRect | ( | SDL_Rect * | rect | ) |
Set the rectangle used to type Unicode text inputs. This is used as a hint for IME and on-screen keyboard placement.
void SDL_StartTextInput | ( | void | ) |
Start accepting Unicode text input events. This function will show the on-screen keyboard if supported.
void SDL_StopTextInput | ( | void | ) |
Stop receiving any text input events. This function will hide the on-screen keyboard if supported.