Input

Undocumented in source.

Members

Aliases

KeyEvent
alias KeyEvent = void delegate(uint, bool)

Function called when key event triggers.

KeyStateEvent
alias KeyStateEvent = void delegate(uint)
Undocumented in source.

Static functions

addKeyDownEvent
void addKeyDownEvent(uint keyCode, KeyStateEvent func)

Add a key event only when the key is down.

addKeyEvent
void addKeyEvent(uint keyCode, KeyEvent func)

Add an event to be fired when the given key changes.

addKeyUpEvent
void addKeyUpEvent(uint keyCode, KeyStateEvent func)

Add a key event only when the key is up.

getState
T getState(string input, bool checkPrevious)

Gets the state of a string-bound input.

initialize
void initialize()

Processes Config/Input.yml and pulls input string bindings.

isKeyDown
bool isKeyDown(uint keyCode, bool checkPrevious)

Check if a given key is down.

isKeyUp
bool isKeyUp(uint keyCode, bool checkPrevious)

Check if a given key is up.

setKeyState
void setKeyState(uint keyCode, bool newState)

Sets the state of the key to be assigned at the beginning of next frame. Should only be called from a window controller.

update
void update()

Updates the key states, and calls all key events.

Meta