Object <- Input <- KeyInput |
|
|
DispatchInput Init QueueKey |
|
KeyCode |
| Field | Type | |
|---|---|---|
| Input: | startTime: | Unsigned |
| stopTime: | Unsigned | |
| KeyInput: | keyCode: | Character |
instance KeyInput tag; startTime: 0; stopTime: 0; keyCode: nilObject; end instance;
// KeyInput represents a typed key // most key input devices are simple and can use the base class, thus QueueKey is provided Define Class KeyInput; inherits from Input; field keyCode: Character, getter; intrinsic QueueKey(key: Character; time: Unsigned); // create and queue a key input attribute KeyCode: Character, readOnly; // code for the key overrides Init, DispatchInput; end class;