sdl3-bindgen-sys
Safe HaskellNone
LanguageGHC2021

SDL3.Sys.Keycode

Description

Defines constants which identify keyboard keys and modifiers.

Please refer to the Best Keyboard Practices document for details on what this information means and how best to use it.

https://wiki.libsdl.org/SDL3/BestKeyboardPractices The SDL virtual key representation.

Values of this type are used to represent keyboard keys using the current layout of the keyboard. These values include Unicode values representing the unmodified character that would be generated by pressing the key, or an SDLK_* constant for those keys that do not generate characters.

A special exception is the number keys at the top of the keyboard which map by default to SDLK_0...SDLK_9 on AZERTY layouts.

Keys with the sDLK_EXTENDED_MASK bit set do not map to a scancode or Unicode code point.

Many common keycodes are listed below, but this list is not exhaustive.

See also
SDL_HINT_KEYCODE_OPTIONS

FFI conventions

Unsuffixed aliases are unsafe foreign imports; aliases suffixed Safe are safe. Functions whose callbacks fire during the call export only the Safe alias (the genuine unsafe import stays reachable under SDL3.Sys.Bindgen.Keycode.Unsafe); functions curated unsafe-only export only the unsuffixed one. Each alias's documentation records its flavor and rationale.

Full conventions: SDL3.Sys.

Since: 3.2.0

Synopsis

Documentation

Typed constants

pattern SDL_KMOD_NONE :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_NONE. Combine with .|. from Data.Bits.

pattern SDL_KMOD_LSHIFT :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_LSHIFT. Combine with .|. from Data.Bits.

pattern SDL_KMOD_RSHIFT :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_RSHIFT. Combine with .|. from Data.Bits.

pattern SDL_KMOD_LEVEL5 :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_LEVEL5. Combine with .|. from Data.Bits.

pattern SDL_KMOD_LCTRL :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_LCTRL. Combine with .|. from Data.Bits.

pattern SDL_KMOD_RCTRL :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_RCTRL. Combine with .|. from Data.Bits.

pattern SDL_KMOD_LALT :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_LALT. Combine with .|. from Data.Bits.

pattern SDL_KMOD_RALT :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_RALT. Combine with .|. from Data.Bits.

pattern SDL_KMOD_LGUI :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_LGUI. Combine with .|. from Data.Bits.

pattern SDL_KMOD_RGUI :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_RGUI. Combine with .|. from Data.Bits.

pattern SDL_KMOD_NUM :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_NUM. Combine with .|. from Data.Bits.

pattern SDL_KMOD_CAPS :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_CAPS. Combine with .|. from Data.Bits.

pattern SDL_KMOD_MODE :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_MODE. Combine with .|. from Data.Bits.

pattern SDL_KMOD_SCROLL :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_SCROLL. Combine with .|. from Data.Bits.

pattern SDL_KMOD_CTRL :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_CTRL. Combine with .|. from Data.Bits.

pattern SDL_KMOD_SHIFT :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_SHIFT. Combine with .|. from Data.Bits.

pattern SDL_KMOD_ALT :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_ALT. Combine with .|. from Data.Bits.

pattern SDL_KMOD_GUI :: SDL_Keymod Source #

Typed constant for macro SDL_KMOD_GUI. Combine with .|. from Data.Bits.