KeyEvent

Prev Next Home Home Table Of Contents Index

KeyEvent (Key) : Procedure

KeyEvent allows you to assign a procedure to a key so that any time the key is pressed the procedure is called. Setting a key to Nil clears the key. This command can be used to create global OnKey.


Example:
KeyEvent(F1) = loc ShowHelp ;runs ShowHelp when F1 is pressed KeyEvent(F1) = Nil ;clears F1 key Run KeyEvent(F1) ;executes procedure assigned to F1

KeyEvents are attached to the current window. New windows inherit the KeyEvents from their parent window. But if you create a new KeyEvent in a window and then erase that window the new KeyEvent is erased and the KeyEvents of the parent window are restored. You can have completely different KeyEvents for each window and those events become active whenever the window becomes active.

See Also: ClearKeyEvents

Category: Execution Event

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home