8#include <entt/locator/locator.hpp>
24 auto& lua = entt::locator<sol::state>::value();
34 auto keyboard_type = lua.new_usertype<
Keyboard>(
"Keyboard", sol::no_constructor);
42 auto mouse_type = lua.new_usertype<
Mouse>(
"Mouse", sol::no_constructor);
63 lua.new_enum<
Keys>(
"Keys",
323 lua.new_enum<
KeyMods>(
"KeyMods",
Physical keyboard device and state management.
void clear_state() const noexcept
Will clear any existing keyboard state.
void end_text_input() const noexcept
Disable text input.
bool onscreen_keyboard_active() const noexcept
Check if onscreen keyboard is shown.
bool has_keyboard() const noexcept
Check if there is a keyboard connected.
void begin_text_input(const SDL_TextInputType input_type, const SDL_Capitalization capitals, const bool multiline) const noexcept
Enable window to begin processing text input.
bool has_onscreen_keyboard() const noexcept
Check if an onscreen keyboard is supported.
static void inject_input() noexcept
Injects input handling into Lua.
Physical mouse device and state management.
void set_cursor_system(const SDL_SystemCursor cursor) noexcept
Set cursor to a system cursor.
void hide_cursor() const noexcept
Hide cursor.
void restore_cursor() noexcept
Set the cursor back to default.
void set_mouse_grab(const bool grabbed) const noexcept
Toggle mouse grab.
void show_cursor() const noexcept
Show cursor.
bool has_mouse() const noexcept
Check if there is a mouse connected.
void set_cursor_custom(const std::string &cursor, const glm::ivec2 &hotspot) noexcept
Set custom cursor texture.
void warp_mouse(const float x, const float y) const noexcept
Move the mouse cursor to the given position within the window.
Keys
Enum class representing keys.
@ KEY_MEDIA_PREVIOUS_TRACK
KeyMods
Enum class for key modifiers.
MouseButton
Enum class representing mouse buttons.