mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-27 03:50:25 +00:00
Sync SDL3 wiki -> header
This commit is contained in:
parent
c298a3749b
commit
1966472f73
@ -197,9 +197,11 @@ typedef struct SDL_Keymap SDL_Keymap;
|
||||
/**
|
||||
* Get a reference to the current keyboard layout.
|
||||
*
|
||||
* You should release the reference to the keymap with SDL_ReleaseKeymap() when you're done with it.
|
||||
* You should release the reference to the keymap with SDL_ReleaseKeymap()
|
||||
* when you're done with it.
|
||||
*
|
||||
* \returns the current keymap, or NULL if the default US-QWERTY keymap is being used.
|
||||
* \returns the current keymap, or NULL if the default US-QWERTY keymap is
|
||||
* being used.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*
|
||||
@ -210,9 +212,13 @@ typedef struct SDL_Keymap SDL_Keymap;
|
||||
extern SDL_DECLSPEC SDL_Keymap * SDLCALL SDL_GetCurrentKeymap(void);
|
||||
|
||||
/**
|
||||
* Get the key code corresponding to the given scancode and modifier state using the provided keymap.
|
||||
* Get the key code corresponding to the given scancode and modifier state
|
||||
* using the provided keymap.
|
||||
*
|
||||
* Note that this is not the same as the input that would be generated by pressing this key. There are many factors involved, such as dead key composition, input method editors, etc. If you're looking for a way to get text input, you should handle SDL_EVENT_TEXT_INPUT.
|
||||
* Note that this is not the same as the input that would be generated by
|
||||
* pressing this key. There are many factors involved, such as dead key
|
||||
* composition, input method editors, etc. If you're looking for a way to get
|
||||
* text input, you should handle SDL_EVENT_TEXT_INPUT.
|
||||
*
|
||||
* \param keymap the SDL_Keymap to query, or NULL for the default keymap.
|
||||
* \param scancode the SDL_Scancode to translate.
|
||||
@ -228,7 +234,8 @@ extern SDL_DECLSPEC SDL_Keymap * SDLCALL SDL_GetCurrentKeymap(void);
|
||||
extern SDL_DECLSPEC SDL_Keycode SDLCALL SDL_GetKeymapKeycode(SDL_Keymap *keymap, SDL_Scancode scancode, SDL_Keymod modstate);
|
||||
|
||||
/**
|
||||
* Get the scancode and modifier state corresponding to the given key code using the provided keymap.
|
||||
* Get the scancode and modifier state corresponding to the given key code
|
||||
* using the provided keymap.
|
||||
*
|
||||
* Note that there may be multiple scancode+modifier states that can generate
|
||||
* this keycode, this will just return the first one found.
|
||||
@ -260,7 +267,12 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseKeymap(SDL_Keymap *keymap);
|
||||
/**
|
||||
* Get the key code that would be sent with the given scancode in a key event.
|
||||
*
|
||||
* This uses the information from the current keymap along with the options specified in SDL_HINT_KEYCODE_OPTIONS to get the keycode that would be delivered to the application in a key event. This is typically the unmodified version of the key based on the current keyboard layout. For example, the keycode for SDL_SCANCODE_A + SDL_KMOD_SHIFT using the US QWERTY layout would be 'a'.
|
||||
* This uses the information from the current keymap along with the options
|
||||
* specified in SDL_HINT_KEYCODE_OPTIONS to get the keycode that would be
|
||||
* delivered to the application in a key event. This is typically the
|
||||
* unmodified version of the key based on the current keyboard layout. For
|
||||
* example, the keycode for SDL_SCANCODE_A + SDL_KMOD_SHIFT using the US
|
||||
* QWERTY layout would be 'a'.
|
||||
*
|
||||
* \param scancode the SDL_Scancode to translate.
|
||||
* \param modstate the modifier state to use when translating the scancode to
|
||||
@ -332,7 +344,9 @@ extern SDL_DECLSPEC SDL_Scancode SDLCALL SDL_GetScancodeFromName(const char *nam
|
||||
* If the key doesn't have a name, this function returns an empty string ("").
|
||||
*
|
||||
* \param key the desired SDL_Keycode to query.
|
||||
* \param uppercase SDL_TRUE if the name should be the letter printed on the key on the keyboard, which is usually uppercase, or SDL_FALSE to return the name of the key unchanged.
|
||||
* \param uppercase SDL_TRUE if the name should be the letter printed on the
|
||||
* key on the keyboard, which is usually uppercase, or
|
||||
* SDL_FALSE to return the name of the key unchanged.
|
||||
* \returns a UTF-8 encoded string of the key name.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
@ -347,7 +361,10 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetKeyName(SDL_Keycode key, SDL_boo
|
||||
* Get a key code from a human-readable name.
|
||||
*
|
||||
* \param name the human-readable key name.
|
||||
* \param uppercase SDL_TRUE if the name is the letter printed on the key on the keyboard, which is usually uppercase, and this function should return the unshifted version of the key, or SDL_FALSE to return the key unchanged.
|
||||
* \param uppercase SDL_TRUE if the name is the letter printed on the key on
|
||||
* the keyboard, which is usually uppercase, and this
|
||||
* function should return the unshifted version of the key,
|
||||
* or SDL_FALSE to return the key unchanged.
|
||||
* \returns key code, or `SDLK_UNKNOWN` if the name wasn't recognized; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user