1getkey(1)                   General Commands Manual                  getkey(1)
2
3
4

NAME

6       getkey - wait until a key is pressed
7
8

SYNOPSIS

10       getkey [OPTION]... [KEYS]
11
12

DESCRIPTION

14       getkey  waits until one of KEYS is pressed.  If KEYS are not specified,
15       any key is accepted.  KEYS are matched case-insensitive.
16
17

EXIT STATUS

19       getkey exits with status 0 if one of the expected keys is pressed.   If
20       invalid  arguments  are  specified,  getkey  exits with status 255.  If
21       getkey is interrupted or the wait times out, getkey  exits  with  other
22       non-zero status.
23
24

OPTIONS

26       -c, --wait SECONDS
27              Wait only for SECONDS seconds.  The default is 0, which means to
28              wait without a time limit.
29
30
31       -i, --ignore-control-chars
32              Don't treat Ctrl+C and Ctrl+D specially.  When  this  option  is
33              not specified, these characters interrupt getkey.
34
35
36       -m, --message MESSAGE
37              Display  MESSAGE while waiting.  The message is used as a format
38              string in sprintf(3), with a single argument, the number of sec‐
39              onds  left.   Typical  usage is therefore "Press a key within %d
40              seconds to ...".  If MESSAGE contains other format string direc‐
41              tives, the behavior is undefined and getkey may crash.
42
43              If  there is no time limit specified, the number of seconds left
44              is reported as 0.
45
46
47
48                                   Jan 2006                          getkey(1)
Impressum