1.\" 2.\" Copyright (C) 1992, 93, 96, 97, 98, 99, 2001, 02 Free Software 3.\" Foundation, Inc. 4.\" 5.\" Permission is granted to copy, distribute and/or modify this 6.\" document under the terms of the GNU Free Documentation License, 7.\" Version 1.1 or any later version published by the Free Software 8.\" Foundation; with no Invariant Sections, with the Front-Cover texts 9.\" being "A GNU Manual," and with the Back-Cover Texts as in (a) 10.\" below. A copy of the license is included in the section entitled 11.\" "GNU Free Documentation License." 12.\" 13.\" (a) The FSF's Back-Cover Text is: "You have freedom to copy and 14.\" modify this GNU Manual, like GNU software. Copies published by 15.\" the Free Software Foundation raise funds for GNU development." 16.\" 17.Dd February 15, 2003 18.Dt INFOKEY 1 19.Os 20.Sh NAME 21.Nm infokey 22.Nd compile custom key bindings file 23.Sh SYNOPSIS 24.Nm infokey 25.Op Fl -help 26.Op Fl -version 27.Op Fl -output Ar file 28.Op Ar input file 29.Sh DESCRIPTION 30The 31.Nm 32utility compiles a source file 33.Po Pa $HOME/.infokey 34 by default 35.Pc 36containing 37.Xr info 1 38customizations into a binary format 39.Po Pa $HOME/.info 40 by default 41.Pc . 42.Xr info 1 43reads the binary file at startup to override the 44default key bindings and variable definitions. 45.Pp 46Besides the standard 47.Fl -help 48and 49.Fl -version 50options, the only option is 51.Fl -output Ar file . 52This tells 53.Nm infokey 54to write the binary data to 55.Ar file 56instead of 57.Pa $HOME/.info . 58.Pp 59The format of the source file read by 60.Nm 61is most easily illustrated by example. 62For instance, here is a sample 63.Pa .infokey 64source file suitable for aficionados of 65.Xr vi 1 66or 67.Xr less 1 : 68.Bd -literal -offset indent 69#info 70j next-line 71k prev-line 72l forward-char 73h backward-char 74\ekd next-line 75\eku prev-line 76\ekr forward-char 77\ekl backward-char 78\e scroll-forward 79\ekD scroll-forward-page-only 80b scroll-backward 81\ekU scroll-backward-page-only 82g beginning-of-node 83\ekh beginning-of-node 84G end-of-node 85\eke end-of-node 86\et select-reference-this-line 87- history-node 88n next-node 89p prev-node 90u up-node 91t top-node 92d dir-node 93#var 94scroll-step=1 95.Ed 96.Pp 97The source file consists of one or more "sections". 98Each section starts with a line that identifies the type of section. 99Possible sections are: 100.Bl -tag -width Ds 101.It #info 102Key bindings for 103.Xr info 1 104windows. 105The start of this section is indicated by a line containing just `#info' 106by itself. 107If this is the first section in the source file, 108the `#info' line can be omitted. 109The rest of this section consists of lines of the form: 110.Bd -literal -offset 3n 111STRING whitespace ACTION [ whitespace [ # comment ] ] newline 112.Ed 113.Pp 114Whitespace is any sequence of one or more spaces and/or tabs. 115Comment is any sequence of any characters, excluding newline. 116.Pp 117STRING is the key sequence which invokes the action. 118ACTION is the name of an 119.Xr info 1 120command. 121The characters in STRING are interpreted literally or prefixed by a 122caret (`^') to indicate a control character. 123A backslash followed by certain characters specifies input keystrokes 124as follows: 125.Pp 126.Bl -tag -width Ds -offset indent -compact 127.It \eb 128Backspace 129.It \ee 130Escape (ESC) 131.It \en 132Newline 133.It \er 134Return 135.It \et 136Tab 137.It \eku 138Up arrow 139.It \ekd 140Down arrow 141.It \ekl 142Left arrow 143.It \ekr 144Right arrow 145.It \ekU 146Page Up 147.It \ekD 148Page Down 149.It \ekh 150HOME 151.It \eke 152END 153.It \ekx 154Delete (DEL) 155.It \emX 156Meta-X, where X is any character as described above 157.El 158.Pp 159Backslash followed by any other character indicates that character 160is to be taken literally. 161Characters which must be preceded by a backslash include 162caret, space, tab, and backslash itself. 163.It #echo-area 164Key bindings for the echo area. 165The start of this section is indicated by a line containing just 166`#echo-area' by itself. 167The rest of this section has a syntax identical to that for the key 168definitions for the 169.Xr info 1 170area, described above. 171.It #var 172Variable initializations. 173The start of this section is indicated by a line containing just `#var' 174by itself. 175Following this line is a list of variable assignments, one per line. 176Each line consists of a variable name followed by `=', 177followed by a value. 178There may be no whitespace between the variable name and the `=', 179and all characters following the `=', 180including whitespace, are included in the value. 181.El 182.Pp 183Blank lines and lines starting with `#' are ignored, except for the 184special section header lines. 185.Pp 186Key bindings defined in the 187.Pa .info 188file take precedence over info's default key bindings, whether or not 189.Cm --vi-keys 190is used. 191A default key binding may be disabled by overriding it in the 192.Pa .info 193file with the action `invalid'. 194In addition, 195.Em all 196default key bindings can be disabled by adding this line 197.Em anywhere 198in the relevant section: 199.Pp 200.Dl #stop 201.Pp 202This will cause 203.Xr info 1 204to ignore all the default key commands for that section. 205.Pp 206.Sy Beware : 207`#stop' can be dangerous. 208Since it disables all default key bindings, you must supply enough new 209key bindings to enable all necessary actions. 210Failure to bind any key to the `quit' command, for example, 211can lead to frustration. 212.Pp 213The order in which key bindings are defined in the 214.Pa .info 215file is not important, except that the command summary produced by the 216`get-help-window' command only displays the 217.Em first 218key that is bound to each command. 219.Sh FILES 220.Bl -tag -width "$HOME/.infokeyXX" -compact 221.It $HOME/.infokey 222Default souce file for customizations. 223.It $HOME/.info 224Default binary file for customizations. 225.El 226.Sh SEE ALSO 227.Xr info 1 228.Sh BUGS 229bug-texinfo@gnu.org 230