Physical keyboard device and state management.
More...
#include <Keyboard.hpp>
Physical keyboard device and state management.
Definition at line 23 of file Keyboard.hpp.
◆ Keyboard() [1/3]
| galaxy::Keyboard::Keyboard |
( |
| ) |
|
|
noexcept |
◆ ~Keyboard()
| galaxy::Keyboard::~Keyboard |
( |
| ) |
|
|
noexcept |
◆ Keyboard() [2/3]
| galaxy::Keyboard::Keyboard |
( |
Keyboard && | | ) |
|
|
privatedelete |
◆ Keyboard() [3/3]
| galaxy::Keyboard::Keyboard |
( |
const Keyboard & | | ) |
|
|
privatedelete |
◆ begin_text_input()
| void galaxy::Keyboard::begin_text_input |
( |
const SDL_TextInputType | input_type, |
|
|
const SDL_Capitalization | capitals, |
|
|
const bool | multiline ) const |
|
noexcept |
Enable window to begin processing text input.
Prevents normal key input until disabled. Triggers SDL_EVENT_TEXT_INPUT and SDL_EVENT_TEXT_EDITING.
- Parameters
-
| input_type | An SDL_TextInputType value that describes text being input. |
| capitals | An SDL_Capitalization value that describes how text should be capitalized. |
| multiline | True if multiple lines of text are allowed. |
Definition at line 21 of file Keyboard.cpp.
◆ is_text_input_active()
| bool galaxy::Keyboard::is_text_input_active |
( |
| ) |
const |
|
nodiscardnoexcept |
Is text input active?
- Returns
- True if in text input mode.
Definition at line 36 of file Keyboard.cpp.
◆ end_text_input()
| void galaxy::Keyboard::end_text_input |
( |
| ) |
const |
|
noexcept |
◆ clear_state()
| void galaxy::Keyboard::clear_state |
( |
| ) |
const |
|
noexcept |
Will clear any existing keyboard state.
Definition at line 46 of file Keyboard.cpp.
◆ has_keyboard()
| bool galaxy::Keyboard::has_keyboard |
( |
| ) |
const |
|
nodiscardnoexcept |
Check if there is a keyboard connected.
- Returns
- True if there is a keyboard connected.
Definition at line 51 of file Keyboard.cpp.
◆ has_onscreen_keyboard()
| bool galaxy::Keyboard::has_onscreen_keyboard |
( |
| ) |
const |
|
nodiscardnoexcept |
Check if an onscreen keyboard is supported.
- Returns
- True if supported.
Definition at line 56 of file Keyboard.cpp.
◆ onscreen_keyboard_active()
| bool galaxy::Keyboard::onscreen_keyboard_active |
( |
| ) |
const |
|
nodiscardnoexcept |
Check if onscreen keyboard is shown.
- Returns
- True if onscreen keyboard is active.
Definition at line 61 of file Keyboard.cpp.
◆ is_key_mod_down()
| bool galaxy::Keyboard::is_key_mod_down |
( |
const KeyMods | modifier | ) |
const |
|
nodiscardnoexcept |
See if a key mod is being held down.
- Parameters
-
- Returns
- True if keymod is currently down.
Definition at line 66 of file Keyboard.cpp.
◆ is_key_down()
| bool galaxy::Keyboard::is_key_down |
( |
const Keys | key | ) |
const |
|
nodiscardnoexcept |
See if a key is being held down.
- Parameters
-
- Returns
- True if key is currently down.
Definition at line 72 of file Keyboard.cpp.
◆ get_scancode()
Get key scancode.
- Parameters
-
| key | Key to query. |
| modifier | Keymod to check. |
- Returns
- Platform-specific scancode of a key.
Definition at line 78 of file Keyboard.cpp.
◆ operator=() [1/2]
Move assignment operator.
◆ operator=() [2/2]
Copy assignment operator.
The documentation for this class was generated from the following files: