The Keypress type

Purpose

A keypress object is not visible in the window but will react to a keypress in the window. The keypress to which it should react can be set with PW('KEYPRESS') (like any object which belongs to the keypress group). An action routine can be set which should be called when the given key is pressed, so that a (fake) return is made to SBasic. If a keypress object does not have an action assigned to it, it will be handled as a HIT event in the owner (as set when creating the keypress object).

In ProWesS, keypresses are case dependant. However, if there is no object which reacts to a particular keypress, then the case is changed and another attempt is made to match that keypress. If there is still no match, then a PW('EVENT_CATCH') can be generated to an object which is designated to catch all unmatched keypresses (this object is selected using PW('CATCH_OBJECT') tag when setting up the outline).

The Type Word

When creating this type of object, the type parameter is:

PW('TYPE_KEYPRESS')

The tags

Here are the tags for this object.
The change (and creation) tags
PW('KEYPRESS_ACTION')
Set the action routine which should be called when the primary or secondary keypress associated with this object is activated. The parameter should be a routine, such as DO_ROUTINE. If there is no action associated with the keypress object, then a HIT will be generated in the parent object (if that exists).
The query tags There are no query tags for this object.

PROGS, Professional & Graphical Software
last edited 1996 May 30 (wl)