Commit | Line | Data |
---|---|---|
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 | |
25 | lesskey \- specify key bindings for less | |
26 | .SH SYNOPSIS | |
27 | .B "lesskey [-o output] [input]" | |
28 | .SH DESCRIPTION | |
29 | .I Lesskey | |
30 | is used to specify a set of key bindings to be used by | |
31 | .I less. | |
32 | The input file is a text file which describes the key bindings, | |
33 | and the output file is a binary file which is used by | |
34 | .I less. | |
35 | If no input file is specified, standard input is used. | |
36 | If no output file is specified, $HOME/.less is used. | |
37 | .PP | |
38 | The input file consists of lines of the form: | |
39 | .sp | |
40 | string <whitespace> action <newline> | |
41 | .sp | |
42 | Whitespace is any sequence of one or more spaces and/or tabs. | |
43 | The "string" is the command key(s) which invoke the action. | |
44 | The string may be a single command key, or a sequence of up to 15 keys. | |
45 | The "action" is the name of the less action, from the list below. | |
46 | The characters in the "string" may appear literally, or be | |
47 | prefixed by a carat to indicate a control key. | |
48 | A backslash may be used to cause the following character | |
49 | to be taken literally. | |
50 | Characters which must be preceeded by backslash include | |
51 | carat, space, tab and the backslash itself. | |
52 | A backslash followed by one to three octal digits may be used to | |
53 | specify a character by its octal value. | |
54 | Blank lines and lines which start with a pound sign (#) are ignored. | |
55 | .PP | |
56 | As an example, the following input file describes the set of | |
57 | default 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 | |
117 | Commands specified by | |
118 | .I lesskey | |
119 | take precedence over the default commands. | |
120 | A default command key may be disabled by including it in the | |
121 | key file with the action "invalid". | |
122 | ||
123 | .SH "SEE ALSO" | |
124 | less(1) |