Texas Instruments TI89 Developer Guide - Page 692
Appendix B, Guidebook. Note
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 692 highlights
650 Appendix A: System Routines - Keyboard push_getkey Declaration: void push_getkey (void) Category(ies): Keyboard Description: Pushes the current key code onto the estack, zero if no key is currently held down. Inputs: None Outputs: For a listing of key codes, see Appendix B in the TI-92 Guidebook. Note that in the standard include file, tiams.h, some keys are conditionally defined differently on the TI-89 versus the TI-92 Plus. So, for example, KB_LEFT is defined to have the value 0x151 when _92 is defined whereas it has the value 0x152 if _89 is defined. The push_getkey routine will always return the value 0x151 which is the remapped TI-92 Plus value. Assumptions: None Side Effects: May expand expression stack, cause heap compression, or throw an error. Availability: On AMS 1.05 and higher. TI-89 / TI-92 Plus Differences: This routine remaps the TI-89 keys to match the TI-92 Plus. This is the TI-BASIC GetKey routine and not the low level keyboard routine. Some of the return values are different than those returned by GKeyIn or the event handler. See Also: pushkey, GKeyIn Example: This example routine waits for ¸ or N to be pressed. It returns TRUE if ¸ was pressed, FALSE if N was pressed. Boolean tKey( void ) { Access_AMS_Global_Variables; unsigned short key, result; do { push_getkey(); result = estack_to_ushort(top_estack, &key) delete_expression( top_estack ); if (1 == result) { if (KB_ENTER == key) return TRUE; if (KB_ESC == key) return FALSE; } } while (TRUE); } TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/692.png)