Syntax
Parameters
info   _Out_Type: GameInputKeyboardInfo* Pointer to a
GameInputKeyboardInfo structure that receives the keyboard properties of the device. If the device doesn’t support keyboard input, every member of the structure is set to zero.
Return value
Type: booltrue if the device supports keyboard input and info was filled in; otherwise, false.
Remarks
TheGetKeyboardInfo method copies the keyboard properties of the device into the caller-provided structure. A device supports keyboard input when the value returned by GetSupportedInput includes GameInputKindKeyboard. If the device doesn’t support keyboard input, GetKeyboardInfo zero-initializes info and returns false.
Most keyboard properties are fixed for the lifetime of the device. The exception is the layout member, which GameInput updates in place when the active keyboard layout changes (for example, when the user switches input languages). When the layout changes, GameInput raises the GameInputDeviceEventKeyboardLayoutUpdated GameInputDeviceEvent to device callbacks registered with IGameInput::RegisterDeviceCallback. Call GetKeyboardInfo again from that callback to read the new layout.
The following example shows how to query the keyboard properties of a device.
keyboardInfo member of the GameInputDeviceInfo structure returned by IGameInputDevice::GetDeviceInfo.
Requirements
Header: GameInput.h Library: gameinput.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
Overview of GameInputGameInputKeyboardInfo
GetSupportedInput
GameInputKind
IGameInput::RegisterDeviceCallback
GameInputDeviceEvent
IGameInputReading::GetKeyState
IGameInputDevice
