aboutsummaryrefslogtreecommitdiffstats
path: root/src/getkey.1
diff options
context:
space:
mode:
authorMiloslav Trmac <mitr@volny.cz>2006-01-25 17:59:55 +0000
committerMiloslav Trmac <mitr@volny.cz>2006-01-25 17:59:55 +0000
commit2393bfe754c416ce7456ad893ae152214a396f76 (patch)
treed3e71d3d90db0bf7782ab3ff005bed063082d957 /src/getkey.1
parent8542d5743685412b5517efb77d4fc6d0bf44bae4 (diff)
downloadinitscripts-2393bfe754c416ce7456ad893ae152214a396f76.tar
initscripts-2393bfe754c416ce7456ad893ae152214a396f76.tar.gz
initscripts-2393bfe754c416ce7456ad893ae152214a396f76.tar.bz2
initscripts-2393bfe754c416ce7456ad893ae152214a396f76.tar.xz
initscripts-2393bfe754c416ce7456ad893ae152214a396f76.zip
Add man page for getkey.
Diffstat (limited to 'src/getkey.1')
-rw-r--r--src/getkey.180
1 files changed, 80 insertions, 0 deletions
diff --git a/src/getkey.1 b/src/getkey.1
new file mode 100644
index 00000000..d445c398
--- /dev/null
+++ b/src/getkey.1
@@ -0,0 +1,80 @@
+.\" A man page for getkey(1). -*- nroff -*-
+.\"
+.\" Copyright (C) 2006 Red Hat, Inc. All rights reserved.
+.\"
+.\" This copyrighted material is made available to anyone wishing to use,
+.\" modify, copy, or redistribute it subject to the terms and conditions of the
+.\" GNU General Public License v.2.
+.\"
+.\" This program is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+.\" more details.
+.\"
+.\" You should have received a copy of the GNU General Public License along
+.\" with this program; if not, write to the Free Software Foundation, Inc.,
+.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+.\"
+.\" Author: Miloslav Trmac <mitr@redhat.com>
+.TH getkey 1 "Jan 2006"
+
+.SH NAME
+getkey \- wait until a key is pressed
+
+.SH SYNOPSIS
+\fBgetkey\fR [\fIOPTION\fR]... [\fIKEYS\fR]
+
+.SH DESCRIPTION
+.B getkey
+waits until one of
+.I KEYS
+is pressed.
+If
+.I KEYS
+are not specified, any key is accepted.
+.I KEYS
+are matched case-insensitive.
+
+.SH EXIT STATUS
+.B getkey
+exits with status 0 if one of the expected keys is pressed.
+If invalid arguments are specified,
+.B getkey
+exits with status 255.
+If
+.B getkey
+is interrupted or the wait times out,
+.B getkey
+exits with other non-zero status.
+
+.SH OPTIONS
+.TP
+\fB\-c\fR, \fB\-\-wait\fR \fISECONDS\fR
+Wait only for
+.I SECONDS
+seconds.
+The default is 0, which means to wait without a time limit.
+
+.TP
+\fB\-i\fR, \fB\-\-ignore\-control\-chars\fR
+Don't treat Ctrl+C and Ctrl+D specially.
+When this option is not specified, these characters interrupt \fBgetkey\fR.
+
+.TP
+\fB\-m\fR, \fB\-\-message\fR \fIMESSAGE\fR
+Display
+.I MESSAGE
+while waiting.
+The message is used as a format string in
+.BR sprintf (8),
+with a single argument, the number of seconds left.
+Typical usage is therefore
+\fB"Press a key within %d seconds to ..."\fR.
+If
+.I MESSAGE
+contains other format string directives, the behavior is undefined and
+.B getkey
+may crash.
+
+If there is no time limit specified,
+the number of seconds left is reported as 0.