getkeySection: User Commands (1)
Updated: Jan 2006
Index Return to Main Contents
NAMEgetkey - wait until a key is pressed
SYNOPSISgetkey [OPTION]... [KEYS]
DESCRIPTIONgetkey waits until one of KEYS is pressed. If KEYS are not specified, any key is accepted. KEYS are matched case-insensitive.
EXIT STATUSgetkey exits with status 0 if one of the expected keys is pressed. If invalid arguments are specified, getkey exits with status 255. If getkey is interrupted or the wait times out, getkey exits with other non-zero status.
- -c, --wait SECONDS
Wait only for
The default is 0, which means to wait without a time limit.
- -i, --ignore-control-chars
Don't treat Ctrl+C and Ctrl+D specially.
When this option is not specified, these characters interrupt getkey.
- -m, --message MESSAGE
The message is used as a format string in
with a single argument, the number of seconds left.
Typical usage is therefore
"Press a key within %d seconds to ...".
contains other format string directives, the behavior is undefined and
If there is no time limit specified, the number of seconds left is reported as 0.
This document was created by man2html, using the manual pages.
Time: 05:29:04 GMT, December 24, 2015