[Main]
Name=_keytest
Type=Function
Subtype=Macro
Header Files=kbd.h
Definition=short _keytest (short row, short col);
Real Definition=#define _keytest(rowcol...) (__keytest (rowcol))
See Also=_keytest_optimized

[Description]
Low-level keyboard reading for single keys.

[Explanation]
_keytest uses <A HREF="$$LINK(_rowread)">_rowread</A> to read the key in a
specific row and column. If the parameters are constants, the argument for
<A HREF="$$LINK(_rowread)">_rowread</A> and the return mask are optimized
into single values.
<BR><BR>
_keytest returns <A HREF="$$LINK(alloc.h/Bool)">TRUE</A> if the key is being
held down, and <A HREF="$$LINK(alloc.h/Bool)">FALSE</A> otherwise.
<BR><BR>
Be sure to read the notes about <A HREF="$$LINK(_rowread)">_rowread</A>.
<BR><BR>
<A HREF="$$LINK(compat.h/)">compat.h</A> defines constant pairs for all keys.
Using these constant pairs, you can use _keytest in this way:
<PRE>if (_keytest (RR_ESC))
  ...
</PRE>

[References]
Out=_rowread
