| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== ASK (get one keystroke) ====== | [[arc draw an arc of an ellipse .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[asin return arcsine .htm|{{btn_next_n.gif|Next page}}]] | | || **ASK** {{blk2blue.jpg|blk2blue.jpg}} **ASK** reads a single keystroke from the keyboard buffer. Program execution stops to wait for a keystroke. If there is already a keystroke in the keyboard buffer, ASK gets one keystroke without waiting. The ASK statement also allows any TIMER attribute events to generate and cycle their own ACCEPT loop. This means any batch processing code can allow other threads to execute their TIMER attribute tasks during the batch process. **Example:** **ASK****                   !Wait for a keystroke** **LOOP WHILE KEYBOARD() !Empty the keyboard buffer** ** ****ASK****                  !without processing keystrokes** **END** **See Also:** [[keycode return last keycode .htm|KEYCODE]] [[keyboard return keystroke waiting .htm|KEYBOARD]]