The CommonPoint application system assumes that there are two types of keys that are used in a keyboard input system: modifier keys and normal keys. The modifier keys (shift, second shift, alt, and caps lock) alter the behavior of normal keys when they are held down at the same time as a normal key.
The state of a keyboard key when an event occurs is packaged into a TKeyEvent object and distributed to interested applications using the MKeyEventHandler object.
Handling input from
the keyboard
The MKeyEventHandler class is a mixin class. It is capable of recognizing four kinds of key events:
The MKeyEventHandler class has two virtual member functions:
This class defines four member functions for each type of modifier key:
Inheriting from the TSimpleEventTarget class enables your application to register itself with the event targeting system. Inheriting from MKeyEventHandler will allow you to manage all other aspects of key events.
Distributing
keyboard events
You will need to have your applications inherit from both MSimpleEventDistributor and TSimpleEventTarget to distribute key events.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.