1 .\" A man page for getkey(1). -*- nroff -*-
3 .\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
5 .\" This copyrighted material is made available to anyone wishing to use,
6 .\" modify, copy, or redistribute it subject to the terms and conditions of the
7 .\" GNU General Public License v.2.
9 .\" This program is distributed in the hope that it will be useful, but WITHOUT
10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 .\" You should have received a copy of the GNU General Public License along
15 .\" with this program; if not, write to the Free Software Foundation, Inc.,
16 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 .\" Author: Miloslav Trmac <mitr@redhat.com>
19 .TH getkey 1 "Jan 2006"
22 getkey \- wait until a key is pressed
25 \fBgetkey\fR [\fIOPTION\fR]... [\fIKEYS\fR]
34 are not specified, any key is accepted.
36 are matched case-insensitive.
40 exits with status 0 if one of the expected keys is pressed.
41 If invalid arguments are specified,
43 exits with status 255.
46 is interrupted or the wait times out,
48 exits with other non-zero status.
52 \fB\-c\fR, \fB\-\-wait\fR \fISECONDS\fR
56 The default is 0, which means to wait without a time limit.
59 \fB\-i\fR, \fB\-\-ignore\-control\-chars\fR
60 Don't treat Ctrl+C and Ctrl+D specially.
61 When this option is not specified, these characters interrupt \fBgetkey\fR.
64 \fB\-m\fR, \fB\-\-message\fR \fIMESSAGE\fR
68 The message is used as a format string in
70 with a single argument, the number of seconds left.
71 Typical usage is therefore
72 \fB"Press a key within %d seconds to ..."\fR.
75 contains other format string directives, the behavior is undefined and
79 If there is no time limit specified,
80 the number of seconds left is reported as 0.