Appendix A: System Routines — Keyboard
653
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
QSysKey
Declaration:
BOOL
QSysKey
(WORD
Key
)
Category(ies):
Keyboard
Description:
Return TRUE if
Key
is a system key: MATH, CATALOG, CHAR, CUSTOM.
Inputs:
Key
— Key value.
Outputs:
TRUE or FALSE.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: QModeKey
Example:
The menu system uses
GKeyIn
to get keys. It sets the GKF_MODAL and
GKF_SYS keys which cause
GKeyIn
to check for system or mode keys
and repush those keys onto the keyboard buffer and return KB_ESC. This
causes system and mode keys to exit menus and be acted on after the
menu is closed.
Key = GKeyIn( NULL, GKF_MODAL | GKF_SYS ); /* in menu code */
.
.
.
/* In the GKeyIn code, QSysKey and QModeKey are used to check for system and mode keys */
.
.
.
if ( ((Flags & GKF_SYS) && QSysKey(Key)) || ((Flags & GKF_MODAL) && QModeKey(Key)) )
{
GKeyPush( Key );
Key = KB_ESC;
}