![]() |
• System Utilities | ||||||||||||||
|
API Links
Developer Links
|
class KeyboardEventHandlerDefined in:
The C4Engine.hKeyboardEventHandler class encapsulates a keyboard event handler function.
Definition
Constructor
Parameters
Description
The KeyboardEventHandler class encapsulates a procedure that is invoked when a keyboard event occurs. Once an instance of the KeyboardEventHandler class has been constructed, it can be installed by calling the Engine::InstallKeyboardEventHandler function.When a keyboard event occurs, the procedures corresponding to all installed keyboard event handlers are invoked. The HandlerProc type is defined as follows.
eventType field of the KeyboardEventData structure specifies what type of keyboard event occurred and can be one of the following values.
keyCode field of the KeyboardEventData structure specifies the Unicode value corresponding to the key that was involved in the event. The modifierKeys field specifies which modifier keys were held down when the event occurred. It can be zero or a combination (through logical OR) of the following value.
cookie parameter is the value passed to the KeyboardEventHandler constructor.The value returned by the handler specifies whether the keyboard event was successfully handled. If the handler returns true, then the keybaord event is considered handled, and no further keyboard event handlers will be called for the same event. If the handler returns false, then the event is passed to the next keyboard event handler.A keyboard event handler is uninstalled by destroying its associated class instance. Base Classes
|