Get the current key modifier state for the keyboard. The key modifier state is a mask special keys that are held down.
See SDL_GetModState for C documentation.
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05
Modulesdl2-2.5.5.0Haskell2010
Get the current key modifier state for the keyboard. The key modifier state is a mask special keys that are held down.
See SDL_GetModState for C documentation.
Information about which keys are currently held down. Use getModState to generate this information.
Eq KeyModifierDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardData KeyModifierDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardOrd KeyModifierDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardRead KeyModifierDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardShow KeyModifierDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardGeneric KeyModifierDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardToNumber KeyModifier Word32Defined in sdl2-2.5.5.0 · SDL.Input.KeyboardFromNumber KeyModifier Word32Defined in sdl2-2.5.5.0 · SDL.Input.Keyboardtype Rep KeyModifier = D1 ('MetaData "KeyModifier"
"SDL.Input.Keyboard"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'False) (C1 ('MetaCons "KeyModifier"
'PrefixI 'True) (((S1 ('MetaSel ('Just "keyModifierLeftShift"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "keyModifierRightShift"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "keyModifierLeftCtrl"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "keyModifierRightCtrl"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "keyModifierLeftAlt"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: ((S1 ('MetaSel ('Just "keyModifierRightAlt"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "keyModifierLeftGUI"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "keyModifierRightGUI"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: (S1 ('MetaSel ('Just "keyModifierNumLock"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "keyModifierCapsLock"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "keyModifierAltGr"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))))))Defined in sdl2-2.5.5.0 · SDL.Input.KeyboardGet a snapshot of the current state of the keyboard.
This computation generates a mapping from Scancode to Bool - evaluating the function at specific Scancodes will inform you as to whether or not that key was held down when getKeyboardState was called.
See SDL_GetKeyboardState for C documentation.
Set the rectangle used to type text inputs and start accepting text input events.
See SDL_StartTextInput for C documentation.
Stop receiving any text input events.
See SDL_StopTextInput for C documentation.
Check whether the platform has screen keyboard support.
See SDL_HasScreenKeyboardSupport for C documentation.
Check whether the screen keyboard is shown for the given window.
See SDL_IsScreenKeyboardShown for C documentation.
Get a human-readable name for a scancode. If the scancode doesn't have a name this function returns the empty string.
See SDL_GetScancodeName for C documentation.
Bounded ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesEq ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesData ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesOrd ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesRead ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesShow ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesGeneric ScancodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesToNumber Scancode Word32Defined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesFromNumber Scancode Word32Defined in sdl2-2.5.5.0 · SDL.Input.Keyboard.Codestype Rep Scancode = D1 ('MetaData "Scancode"
"SDL.Input.Keyboard.Codes"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'True) (C1 ('MetaCons "Scancode"
'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapScancode"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))Defined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesBounded KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesEq KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesData KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesOrd KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesRead KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesShow KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesGeneric KeycodeDefined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesToNumber Keycode Int32Defined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesFromNumber Keycode Int32Defined in sdl2-2.5.5.0 · SDL.Input.Keyboard.Codestype Rep Keycode = D1 ('MetaData "Keycode"
"SDL.Input.Keyboard.Codes"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'True) (C1 ('MetaCons "Keycode"
'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapKeycode"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int32)))Defined in sdl2-2.5.5.0 · SDL.Input.Keyboard.CodesInformation about a key press or key release event.
KeysymkeysymScancode :: ScancodeThe keyboard Scancode
keysymKeycode :: KeycodeSDL's virtual key representation for this key
keysymModifier :: KeyModifierA set of modifiers that were held at the time this data was generated
Eq KeysymDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardData KeysymDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardOrd KeysymDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardRead KeysymDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardShow KeysymDefined in sdl2-2.5.5.0 · SDL.Input.KeyboardGeneric KeysymDefined in sdl2-2.5.5.0 · SDL.Input.Keyboardtype Rep Keysym = D1 ('MetaData "Keysym"
"SDL.Input.Keyboard"
"sdl2-2.5.5.0-3sH3mgPhw4837qWuaPOiH"
'False) (C1 ('MetaCons "Keysym"
'PrefixI 'True) (S1 ('MetaSel ('Just "keysymScancode"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Scancode) :*: (S1 ('MetaSel ('Just "keysymKeycode"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Keycode) :*: S1 ('MetaSel ('Just "keysymModifier"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KeyModifier))))Defined in sdl2-2.5.5.0 · SDL.Input.Keyboardmodule SDL.Input.Keyboard.Codes