.\" This manpage content is licensed under Creative Commons
.\"  Attribution 4.0 International (CC BY 4.0)
.\"   https://creativecommons.org/licenses/by/4.0/
.\" This manpage was generated from SDL's wiki page for SDL_KeyboardEvent:
.\"   https://wiki.libsdl.org/SDL_KeyboardEvent
.\" Generated with SDL/build-scripts/wikiheaders.pl
.\"  revision release-3.2.8-0-gf6864924f
.\" Please report issues in this manpage's content at:
.\"   https://github.com/libsdl-org/sdlwiki/issues/new
.\" Please report issues in the generation of this manpage from the wiki at:
.\"   https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_KeyboardEvent
.\" SDL can be found at https://libsdl.org/
.de URL
\$2 \(laURL: \$1 \(ra\$3
..
.if \n[.g] .mso www.tmac
.TH SDL_KeyboardEvent 3type "SDL 3.2.8" "Simple Directmedia Layer" "SDL3 DATATYPES"
.SH NAME
SDL_KeyboardEvent \- Keyboard button event structure (event\[char46]key\[char46]*)
.SH HEADER FILE
Defined in SDL3/SDL_events\[char46]h

.SH SYNOPSIS
.nf
.B #include \(dqSDL3/SDL.h\(dq
.PP
.BI "typedef struct SDL_KeyboardEvent
.BI "{
.BI "    SDL_EventType type;     /**< SDL_EVENT_KEY_DOWN or SDL_EVENT_KEY_UP */
.BI "    Uint32 reserved;
.BI "    Uint64 timestamp;       /**< In nanoseconds, populated using SDL_GetTicksNS() */
.BI "    SDL_WindowID windowID;  /**< The window with keyboard focus, if any */
.BI "    SDL_KeyboardID which;   /**< The keyboard instance id, or 0 if unknown or virtual */
.BI "    SDL_Scancode scancode;  /**< SDL physical key code */
.BI "    SDL_Keycode key;        /**< SDL virtual key code */
.BI "    SDL_Keymod mod;         /**< current key modifiers */
.BI "    Uint16 raw;             /**< The platform dependent scancode for this event */
.BI "    bool down;              /**< true if the key is pressed */
.BI "    bool repeat;            /**< true if this is a key repeat */
.BI "} SDL_KeyboardEvent;
.fi
.SH DESCRIPTION
The
.BR key
is the base 
.BR SDL_Keycode
 generated by pressing the
.BR scancode
using the current keyboard layout, applying any options
specified in 
.BR SDL_HINT_KEYCODE_OPTIONS
\[char46] You can
get the 
.BR SDL_Keycode
 corresponding to the event scancode and
modifiers directly from the keyboard layout, bypassing

.BR SDL_HINT_KEYCODE_OPTIONS
, by calling

.BR SDL_GetKeyFromScancode
()\[char46]

.SH AVAILABILITY
This struct is available since SDL 3\[char46]2\[char46]0\[char46]

.SH SEE ALSO
.BR \(bu (3),
.BR SDL_GetKeyFromScancode (3),
.BR \(bu (3),
.BR SDL_HINT_KEYCODE_OPTIONS (3)