don't pause after exiting from help file
[unix-history] / usr / src / usr.bin / more / lesskey.1
CommitLineData
bfe13c81
KB
1.\"
2.\" Copyright (c) 1988 Mark Nudleman
3.\" Copyright (c) 1988 Regents of the University of California.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to Berkeley by
7.\" Mark Nudleman.
8.\"
9.\" Redistribution and use in source and binary forms are permitted
10.\" provided that the above copyright notice and this paragraph are
11.\" duplicated in all such forms and that any documentation,
12.\" advertising materials, and other materials related to such
13.\" distribution and use acknowledge that the software was developed
14.\" by the University of California, Berkeley. The name of the
15.\" University may not be used to endorse or promote products derived
16.\" from this software without specific prior written permission.
17.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
18.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
19.\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20.\"
21.\" @(#)lesskey.1 5.1 (Berkeley) %G%
22.\"
23.TH LESSKEY 1
24.SH NAME
25lesskey \- specify key bindings for less
26.SH SYNOPSIS
27.B "lesskey [-o output] [input]"
28.SH DESCRIPTION
29.I Lesskey
30is used to specify a set of key bindings to be used by
31.I less.
32The input file is a text file which describes the key bindings,
33and the output file is a binary file which is used by
34.I less.
35If no input file is specified, standard input is used.
36If no output file is specified, $HOME/.less is used.
37.PP
38The input file consists of lines of the form:
39.sp
40 string <whitespace> action <newline>
41.sp
42Whitespace is any sequence of one or more spaces and/or tabs.
43The "string" is the command key(s) which invoke the action.
44The string may be a single command key, or a sequence of up to 15 keys.
45The "action" is the name of the less action, from the list below.
46The characters in the "string" may appear literally, or be
47prefixed by a carat to indicate a control key.
48A backslash may be used to cause the following character
49to be taken literally.
50Characters which must be preceeded by backslash include
51carat, space, tab and the backslash itself.
52A backslash followed by one to three octal digits may be used to
53specify a character by its octal value.
54Blank lines and lines which start with a pound sign (#) are ignored.
55.PP
56As an example, the following input file describes the set of
57default command keys used by less:
58.sp
59.nf
60 k back-line
61 y back-line
62 ^K back-line
63 ^Y back-line
64 ^P back-line
65 b back-screen
66 ^B back-screen
67 \\33v back-screen
68 u back-scroll
69 ^U back-scroll
70 ? back-search
71 E examine
72 ^X^V examine
73 + first-cmd
74 e forw-line
75 j forw-line
76 ^E forw-line
77 ^J forw-line
78 ^M forw-line
79 ^N forw-line
80 f forw-screen
81 ^F forw-screen
82 \\40 forw-screen
83 ^V forw-screen
84 d forw-scroll
85 ^D forw-scroll
86 / forw-search
87 G goto-end
88 > goto-end
89 \\33> goto-end
90 g goto-line
91 < goto-line
92 \\33< goto-line
93 ' goto-mark
94 ^X^X goto-mark
95 H help
96 N next-file
97 % percent
98 p percent
99 P prev-file
100 q quit
101 ZZ quit
102 ^L repaint
103 ^R repaint
104 r repaint
105 R flush-repaint
106 n repeat-search
107 m set-mark
108 ! shell
109 = status
110 ^G status
111 - toggle-option
112 _ display-option
113 V version
114 v visual
115.fi
116.sp
117Commands specified by
118.I lesskey
119take precedence over the default commands.
120A default command key may be disabled by including it in the
121key file with the action "invalid".
122
123.SH "SEE ALSO"
124less(1)