8 lesskey - specify key bindings for less
10 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
11 l
\ble
\bes
\bss
\bsk
\bke
\bey
\by [
\b[-
\b-o
\bo o
\bou
\but
\btp
\bpu
\but
\bt]
\b] [
\b[-
\b--
\b-]
\b] [
\b[i
\bin
\bnp
\bpu
\but
\bt]
\b]
12 l
\ble
\bes
\bss
\bsk
\bke
\bey
\by [
\b[-
\b--
\b-o
\bou
\but
\btp
\bpu
\but
\bt=
\b=o
\bou
\but
\btp
\bpu
\but
\bt]
\b] [
\b[-
\b--
\b-]
\b] [
\b[i
\bin
\bnp
\bpu
\but
\bt]
\b]
13 l
\ble
\bes
\bss
\bsk
\bke
\bey
\by -
\b-V
\bV
14 l
\ble
\bes
\bss
\bsk
\bke
\bey
\by -
\b--
\b-v
\bve
\ber
\brs
\bsi
\bio
\bon
\bn
16 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
17 _
\bL_
\be_
\bs_
\bs_
\bk_
\be_
\by is used to specify a set of key bindings to be
18 used by _
\bl_
\be_
\bs_
\bs_
\b. The input file is a text file which
19 describes the key bindings, If the input file is "-",
20 standard input is read. If no input file is specified, a
21 standard filename is used as the name of the input file,
22 which depends on the system being used: On Unix systems,
23 $HOME/.lesskey is used; on MS-DOS systems, $HOME/_lesskey
24 is used; and on OS/2 systems $HOME/lesskey.ini is used, or
25 $INIT/lesskey.ini if $HOME is undefined. The output file
26 is a binary file which is used by _
\bl_
\be_
\bs_
\bs_
\b. If no output file
27 is specified, and the environment variable LESSKEY is set,
28 the value of LESSKEY is used as the name of the output
29 file. Otherwise, a standard filename is used as the name
30 of the output file, which depends on the system being
31 used: On Unix and OS-9 systems, $HOME/.less is used; on
32 MS-DOS systems, $HOME/_less is used; and on OS/2 systems,
33 $HOME/less.ini is used, or $INIT/less.ini if $HOME is
34 undefined. If the output file already exists, _
\bl_
\be_
\bs_
\bs_
\bk_
\be_
\by
37 The -V or --version option causes _
\bl_
\be_
\bs_
\bs_
\bk_
\be_
\by to print its
38 version number and immediately exit. If -V or --version
39 is present, other options and arguments are ignored.
41 The input file consists of one or more _
\bs_
\be_
\bc_
\bt_
\bi_
\bo_
\bn_
\bs_
\b. Each
42 section starts with a line that identifies the type of
43 section. Possible sections are:
46 Defines new command keys.
49 Defines new line-editing keys.
51 #env Defines environment variables.
53 Blank lines and lines which start with a pound sign (#)
54 are ignored, except for the special section header lines.
57 C
\bCO
\bOM
\bMM
\bMA
\bAN
\bND
\bD S
\bSE
\bEC
\bCT
\bTI
\bIO
\bON
\bN
58 The command section begins with the line
64 Version 381: 17 Jan 2003 1
73 If the command section is the first section in the file,
74 this line may be omitted. The command section consists of
77 _
\bs_
\bt_
\br_
\bi_
\bn_
\bg <whitespace> _
\ba_
\bc_
\bt_
\bi_
\bo_
\bn [extra-string] <newline>
79 Whitespace is any sequence of one or more spaces and/or
80 tabs. The _
\bs_
\bt_
\br_
\bi_
\bn_
\bg is the command key(s) which invoke the
81 action. The _
\bs_
\bt_
\br_
\bi_
\bn_
\bg may be a single command key, or a
82 sequence of up to 15 keys. The _
\ba_
\bc_
\bt_
\bi_
\bo_
\bn is the name of the
83 less action, from the list below. The characters in the
84 _
\bs_
\bt_
\br_
\bi_
\bn_
\bg may appear literally, or be prefixed by a caret to
85 indicate a control key. A backslash followed by one to
86 three octal digits may be used to specify a character by
87 its octal value. A backslash followed by certain charac
88 ters specifies input characters as follows:
118 A backslash followed by any other character indicates that
119 character is to be taken literally. Characters which must
120 be preceded by backslash include caret, space, tab and the
123 An action may be followed by an "extra" string. When such
124 a command is entered while running _
\bl_
\be_
\bs_
\bs_
\b, the action is
125 performed, and then the extra string is parsed, just as if
126 it were typed in to _
\bl_
\be_
\bs_
\bs_
\b. This feature can be used in
130 Version 381: 17 Jan 2003 2
136 LESSKEY(1) LESSKEY(1)
139 certain cases to extend the functionality of a command.
140 For example, see the "{" and ":t" commands in the example
141 below. The extra string has a special meaning for the
142 "quit" action: when _
\bl_
\be_
\bs_
\bs quits, first character of the
143 extra string is used as its exit status.
146 E
\bEX
\bXA
\bAM
\bMP
\bPL
\bLE
\bE
147 The following input file describes the set of default com
148 mand keys used by less:
181 \e\40 forw-screen-force
196 Version 381: 17 Jan 2003 3
202 LESSKEY(1) LESSKEY(1)
230 \en repeat-search-all
232 \eN reverse-search-all
262 Version 381: 17 Jan 2003 4
268 LESSKEY(1) LESSKEY(1)
285 P
\bPR
\bRE
\bEC
\bCE
\bED
\bDE
\bEN
\bNC
\bCE
\bE
286 Commands specified by _
\bl_
\be_
\bs_
\bs_
\bk_
\be_
\by take precedence over the
287 default commands. A default command key may be disabled
288 by including it in the input file with the action
289 "invalid". Alternatively, a key may be defined to do
290 nothing by using the action "noaction". "noaction" is
291 similar to "invalid", but _
\bl_
\be_
\bs_
\bs will give an error beep for
292 an "invalid" command, but not for a "noaction" command.
293 In addition, ALL default commands may be disabled by
294 adding this control line to the input file:
298 This will cause all default commands to be ignored. The
299 #stop line should be the last line in that section of the
302 Be aware that #stop can be dangerous. Since all default
303 commands are disabled, you must provide sufficient com
304 mands before the #stop line to enable all necessary
305 actions. For example, failure to provide a "quit" command
306 can lead to frustration.
309 L
\bLI
\bIN
\bNE
\bE E
\bED
\bDI
\bIT
\bTI
\bIN
\bNG
\bG S
\bSE
\bEC
\bCT
\bTI
\bIO
\bON
\bN
310 The line-editing section begins with the line:
314 This section specifies new key bindings for the line edit
315 ing commands, in a manner similar to the way key bindings
316 for ordinary commands are specified in the #command sec
317 tion. The line-editing section consists of a list of keys
318 and actions, one per line as in the example below.
321 E
\bEX
\bXA
\bAM
\bMP
\bPL
\bLE
\bE
322 The following input file describes the set of default
323 line-editing keys used by less:
328 Version 381: 17 Jan 2003 5
334 LESSKEY(1) LESSKEY(1)
368 L
\bLE
\bES
\bSS
\bS E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT V
\bVA
\bAR
\bRI
\bIA
\bAB
\bBL
\bLE
\bES
\bS
369 The environment variable section begins with the line
373 Following this line is a list of environment variable
374 assignments. Each line consists of an environment vari
375 able name, an equals sign (=) and the value to be assigned
376 to the environment variable. White space before and after
377 the equals sign is ignored. Variables assigned in this
378 way are visible only to _
\bl_
\be_
\bs_
\bs_
\b. If a variable is specified
379 in the system environment and also in a lesskey file, the
380 value in the lesskey file takes precedence. Although the
381 lesskey file can be used to override variables set in the
382 environment, the main purpose of assigning variables in
383 the lesskey file is simply to have all _
\bl_
\be_
\bs_
\bs configuration
384 information stored in one file.
387 E
\bEX
\bXA
\bAM
\bMP
\bPL
\bLE
\bE
388 The following input file sets the -i option whenever _
\bl_
\be_
\bs_
\bs
389 is run, and specifies the character set to be "latin1":
394 Version 381: 17 Jan 2003 6
400 LESSKEY(1) LESSKEY(1)
409 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
413 W
\bWA
\bAR
\bRN
\bNI
\bIN
\bNG
\bGS
\bS
414 It is not possible to specify special keys, such as upar
415 row, in a keyboard-independent manner. The only way to
416 specify such keys is to specify the escape sequence which
417 a particular keyboard sends when such a key is pressed.
419 On MS-DOS and OS/2 systems, certain keys send a sequence
420 of characters which start with a NUL character (0). This
421 NUL character should be represented as \340 in a lesskey
425 C
\bCO
\bOP
\bPY
\bYR
\bRI
\bIG
\bGH
\bHT
\bT
426 Copyright (C) 2000 Mark Nudelman
428 lesskey is part of the GNU project and is free software;
429 you can redistribute it and/or modify it under the terms
430 of the GNU General Public License as published by the Free
431 Software Foundation; either version 2, or (at your option)
434 lesskey is distributed in the hope that it will be useful,
435 but WITHOUT ANY WARRANTY; without even the implied war
436 ranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR
437 POSE. See the GNU General Public License for more
440 You should have received a copy of the GNU General Public
441 License along with lesskey; see the file COPYING. If not,
442 write to the Free Software Foundation, 59 Temple Place,
443 Suite 330, Boston, MA 02111-1307, USA.
446 A
\bAU
\bUT
\bTH
\bHO
\bOR
\bR
447 Mark Nudelman <markn@greenwoodsoftware.com>
448 Send bug reports or comments to the above address or to
460 Version 381: 17 Jan 2003 7