Appendix A: System Routines — Utilities
1105
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
KB_89
Declaration:
USHORT
KB_89
(USHORT
ch
)
Category(ies):
Utilities
Description:
Translates TI
-
92 Plus keys to TI
-
89 keys.
If this routine is running on a TI
-
89, then
ch
is returned unchanged. If this
routine is running on a TI
-
92 Plus, the cursor arrow key codes are
translated into TI
-
89 cursor arrow key codes.
This routine is useful for writing one source to run on both platforms.
Inputs:
ch
— Character from the CM_KEY_PRESS event or the
ngetchx
routine.
Outputs:
Returns translated character.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also:
Not applicable.
Example:
switch (event->command)
{
USHORT key;
.
.
.
case CM_KEY_PRESS:
key = KB_89(event->info.keyInfo.keyCode);
/* process translated key press */
.
.
.
}