InputDevice

Handles user input (keyboard, mouse, windowing input such as resizing the window, etc.).

Constructors

this
this(long delegate() @safe pure nothrow @nogc getHeight, Logger log)

Construct an InputDevice.

Destructor

~this
~this()

Destroy the InputDevice. Must be called to ensure deletion of manually allocated memory.

Members

Functions

keyboard
const(Keyboard) keyboard()

Get access to keyboard input.

mouse
const(Mouse) mouse()

Get access to mouse input.

quit
bool quit()

Does the user want to quit the program (e.g. by pressing the close window button).

recorder
InputRecordingDevice recorder()

Get a reference to the recording device to record input with.

replay
void replay(Recording!Mouse recording, Flag!"blockMouse" block)

Start replaying mouse input from a recording.

replay
void replay(Recording!Keyboard recording, Flag!"blockKeyboard" block)

Start replaying keyboard input from a recording.

resized
ResizedStatus resized()

Status of resizing the window (converts to true if window was resized this frame).

unicode
dchar unicode()

Get the "current" unicode character for text input purposes.

update
void update()

Collect user input.

Structs

ResizedStatus
struct ResizedStatus

Status of window resizing.

Meta