3 lesskey \- specify key bindings for less
5 .B "lesskey [-o output] [input]"
8 is used to specify a set of key bindings to be used by
10 The input file is a text file which describes the key bindings,
11 and the output file is a binary file which is used by
13 If no input file is specified, standard input is used.
14 If no output file is specified, $HOME/.less is used.
16 The input file consists of lines of the form:
18 string <whitespace> action [extra-string] <newline>
20 Whitespace is any sequence of one or more spaces and/or tabs.
21 The "string" is the command key(s) which invoke the action.
22 The string may be a single command key, or a sequence of up to 15 keys.
23 The "action" is the name of the less action, from the list below.
24 The characters in the "string" may appear literally, or be
25 prefixed by a carat to indicate a control key.
26 A backslash may be used to cause the following character
27 to be taken literally.
28 Characters which must be preceded by backslash include
29 carat, space, tab and the backslash itself.
30 A backslash followed by one to three octal digits may be used to
31 specify a character by its octal value.
32 Blank lines and lines which start with a pound sign (#) are ignored.
34 An action may be followed by an extra string.
35 This string is parsed after the command is entered,
36 just as if it were entered on the command line.
37 This feature can be used in certain cases to extend
38 the functionality of a command.
39 For example, these entries would create a pair of commands
40 to turn on/off line numbers using
45 :set\\ nu toggle-option -N
46 :set\\ nonu toggle-option +N
49 See also the ":ta" command in the example below.
52 The following input file describes the set of
53 default command keys used by less:
114 \e33n repeat-search-all
116 \e33N reverse-search-all
144 Commands specified by
146 take precedence over the default commands.
147 A default command key may be disabled by including it in the
148 key file with the action "invalid".