C4 Engine
C4 Engine API Documentation

Engine::InstallKeyboardEventHandler

Defined in:  C4Engine.h
Installs a keyboard event handler.
Prototype

void InstallKeyboardEventHandler(KeyboardEventHandler *handler, bool last = false);

Parameters
handler The event handler to install.
last Indicates whether the handler is called last.
Description
The InstallKeyboardEventHandler function installs a keyboard event handler that is invoked whenever a keyboard event occurs. If any handler reports that it has successfully handled the keyboard event, then the remaining handlers are not called.

If the last parameter if true, then the event handler specified by the handler parameter is called after all previously installed keyboard event handlers. Otherwise, the new event handler is called before all previously installed handlers.

The engine installs a single keyboard event handler when it starts up to handle user interface interaction.

A keybaord event handler is uninstalled by destroying its associated class instance.
See Also

KeyboardEventHandler

Engine::InstallMouseEventHandler

Engine::InstallDisplayEventHandler