SDL_keyboard_c.h
Go to the documentation of this file.
/*
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "../SDL_internal.h"
#ifndef SDL_keyboard_c_h_
#define SDL_keyboard_c_h_
#include "SDL_keycode.h"
#include "SDL_events.h"
/* Initialize the keyboard subsystem */
extern int SDL_KeyboardInit(void);
/* Clear the state of the keyboard */
extern void SDL_ResetKeyboard(void);
/* Get the default keymap */
extern void SDL_GetDefaultKeymap(SDL_Keycode * keymap);
/* Set the mapping of scancode to key codes */
extern void SDL_SetKeymap(int start, SDL_Keycode * keys, int length);
/* Set a platform-dependent key name, overriding the default platform-agnostic
name. Encoded as UTF-8. The string is not copied, thus the pointer given to
this function must stay valid forever (or at least until the call to
VideoQuit()). */
extern void SDL_SetScancodeName(SDL_Scancode scancode, const char *name);
/* Set the keyboard focus window */
extern void SDL_SetKeyboardFocus(SDL_Window * window);
/* Send a keyboard key event */
extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode);
/* Send keyboard text input */
extern int SDL_SendKeyboardText(const char *text);
/* Send editing text for selected range from start to end */
extern int SDL_SendEditingText(const char *text, int start, int end);
/* Shutdown the keyboard subsystem */
extern void SDL_KeyboardQuit(void);
/* Convert to UTF-8 */
extern char *SDL_UCS4ToUTF8(Uint32 ch, char *dst);
/* Toggle on or off pieces of the keyboard mod state. */
extern void SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle);
#endif /* SDL_keyboard_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */
dst
GLenum GLenum dst
Definition: SDL_opengl_glext.h:1737
SDL_ResetKeyboard
void SDL_ResetKeyboard(void)
Definition: SDL_keyboard.c:572
SDL_SendKeyboardText
int SDL_SendKeyboardText(const char *text)
Definition: SDL_keyboard.c:789
end
GLuint GLuint end
Definition: SDL_opengl.h:1571
state
struct xkb_state * state
Definition: SDL_waylandsym.h:113
SDL_events.h
start
GLuint start
Definition: SDL_opengl.h:1571
Uint32
uint32_t Uint32
Definition: SDL_stdinc.h:181
SDL_SetKeyboardFocus
void SDL_SetKeyboardFocus(SDL_Window *window)
Definition: SDL_keyboard.c:630
SDL_Keycode
Sint32 SDL_Keycode
The SDL virtual key representation.
Definition: SDL_keycode.h:45
SDL_UCS4ToUTF8
char * SDL_UCS4ToUTF8(Uint32 ch, char *dst)
Definition: SDL_keyboard.c:520
name
GLuint const GLchar * name
Definition: SDL_opengl_glext.h:660
SDL_KeyboardQuit
void SDL_KeyboardQuit(void)
Definition: SDL_keyboard.c:832
SDL_keycode.h
Uint8
uint8_t Uint8
Definition: SDL_stdinc.h:157
SDL_KeyboardInit
int SDL_KeyboardInit(void)
Definition: SDL_keyboard.c:562
SDL_GetDefaultKeymap
void SDL_GetDefaultKeymap(SDL_Keycode *keymap)
Definition: SDL_keyboard.c:588
SDL_SendKeyboardKey
int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode)
Definition: SDL_keyboard.c:679
SDL_Keymod
SDL_Keymod
Enumeration of valid key mods (possibly OR&#39;d together).
Definition: SDL_keycode.h:325
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:139
SDL_SetKeymap
void SDL_SetKeymap(int start, SDL_Keycode *keys, int length)
Definition: SDL_keyboard.c:594
text
static char text[MAX_TEXT_LENGTH]
Definition: testime.c:47
window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
SDL_SetScancodeName
void SDL_SetScancodeName(SDL_Scancode scancode, const char *name)
Definition: SDL_keyboard.c:616
SDL_Window
The type used to identify a window.
Definition: SDL_sysvideo.h:73
length
GLuint GLsizei GLsizei * length
Definition: SDL_opengl_glext.h:669
SDL_Scancode
SDL_Scancode
The SDL keyboard scancode representation.
Definition: SDL_scancode.h:43
SDL_SendEditingText
int SDL_SendEditingText(const char *text, int start, int end)
Definition: SDL_keyboard.c:812
SDL_ToggleModState
void SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle)
Definition: SDL_keyboard.c:865