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