Keyboard Input

Keyboard input on the Xbox One is very similar to keyboard input in Universal Windows Platform (UWP) CoreWindow.

This topic contains the following sections:

Overview

The Xbox One Keyboard API provides data about key states, key events, and keyboard presence.

Keyboard input on the Xbox One is very similar to keyboard input in UWP, and supports both eventing and polling models.

Identifying Keyboard Presence

Windows.Devices.Input.KeyboardCapabilities.KeyboardPresent property can be used to determine if a keyboard is connected to the console or not, updating in real time.

Getting Keyboard Input

KeyState Methods

GetKeyState will return the specified keys current state. GetAsyncKeyState will return the state since the last time GetAsyncKeyState was called.

KeyDown/KeyUp

KeyDown and KeyUp will report the VirtualKey of the physical key that was pressed on the keyboard.

CharacterRevieved

CharacterReceived will report the KeyCode of the final character that is reported.

AcceleratorKeyActivated

AcceleratorKeyActivated are the only way to determine when there is an accelerator key combination pressed, e.g. ALT+F4, but will also fire for all other event types.

API Reference

The following are members associated with the keyboard API:

Methods

Events

Properties

See also

Mouse Input

Mouse Overview

Reference

CoreWindow Class

CoreDispatcher Class

KeyboardCapabilities Class