beautypg.com

Getkey – Texas Instruments TI-84 User Manual

Page 456

background image

Chapter 16: Programming

453

getKey

getKey

getKey

getKey

getKey

returns a number corresponding to the last key pressed, according to the key

code diagram below. If no key has been pressed,

getKey

returns 0. Use

getKey

inside

loops to transfer control, for example, when creating video games.

Note:

You can press

É at any time during execution to break the program.

Program

Output

Note:

,

Œ

,

, and

Í

were pressed

during program execution.