Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- GetIt Reference Guide - syntax: n_anykey(<procedurec>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: N_ANYKEY(<procedureC>)

Calls user defined procedure when any "program-detectable" key is pressed.

Example

* Count the number of keys pressed during program
PUBLIC key_count
key_count = 0
N_ANYKEY("Countkeys")
 ...
PROCEDURE Countkeys
key_count = key_count + 1
RETURN

Notes

N_ANYKEY is active only during a Wait state, i.e., during a Wait state -
such as READ, ACCEPT, etc.

87:  INKEY is not a Wait state, N_ANYKEY is not active.

5.0: INKEY is a Wait state, N_ANYKEY is active.

N_ANYKEY("") with a null string disables N_ANYKEY interrupts.  N_ANYKEY
should be disabled while, or as soon as it is no longer needed.

N_ANYKEY detects only those keys with a specific Ascii code.  This excludes
shift and lock keys, but includes Ins and Del.  Use N_ONSHIFT to detect
shift and lock keys.

Clipper processes the key press before the event procedure gets control.

N_ANYKEY() with no parameters is usually issued from inside the Event
Procedure and returns the numeric value of the trapped key.  The key is not
removed from the keyboard buffer.

See Also: N_ONSHIFT N_NOKEY

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson