keyboard/altgr/index: move ctrl rows to distinct inventory mode
[sheet.git] / keyboard / readline.eng.inc.pl
1 use utf8;
2
3 {
4 title => 'readline',
5 version => 1.2,
6 description => [
7         "Reference sheet of default key bindings for GNU readline,",
8         "used for line-editing in most Unix software, notably Emacs and Bash.",
9 ],
10 keywords => [qw( readline gnu bash emacs editing curses )],
11 rows => [4, 3, 2],
12 moderows => '^x=213',
13
14 mode => {
15         ''   => "emacs mode",
16         '^x' => "emacs ctrl-x bindings",
17 },
18
19 flag => {
20         g1 => [info    => "Info command: shows/does something without altering anything."],
21         g2 => [motion  => "Move the cursor."],
22         g4 => [history => "Replace contents involving kill ring, undo, or command history."],
23         g6 => [change  => "Alter current text (filtering or completion)."],
24         g7 => [delete  => "Remove text."],
25         g8 => [misc    => "Miscellaneous commands."],
26         g9 => [mode    => "Additional key functionality (click to view)."],
27
28         arg => ["key<arg>" => "Commands with a dot need a char argument afterwards."],
29         'v21 new' => ["&gt;v2.0" => "Unavailable before readline version 2.1 (1997)."],
30         'xbash ext' => ["bash" => "Default assignment in Bash shells, but not common readline."],
31 },
32
33 def => {
34         '' => {
35                 "\e" => ['g8', "+"],  # label escape as meta key
36
37                 '+<' => ['g4', "history start"],
38                 '+=' => \'+?', #TODO: v21 # emacs, not in v2.0
39                 '+>' => ['g4', "history end"],
40                 '^?' => \'^h',
41                 '+?' => ['g1', "list complet<>ion<>s"],
42                 '^@' => ['g8 v21', "set mark"], # not in v2.0
43
44                 '+#' => ['g6 v21', "prefix comm<>en<>t"], # not in v2.0
45                 '+&' => ['g6', "tilde expand"],
46                 '+*' => ['g6 v21', "complet<>e all"], # not in v2.0
47                 '+.' => ['g4', "insert last"],
48                 '+~' => \'+&', # common emacs
49
50                 '^[' => ['g8', "meta"],
51                 '^+['=> \'^i',
52                 '+\\'=> ['g7', "delete whitesp<>ace"],
53                 '^]' => ['g2 arg v21', "find char"], # not in v2.0
54                 '^+]'=> ['g2 arg v21', "rev find char"], # not in v2.0
55                 '^_' => ['g4', "undo"],
56                 '+_' => \'+.',
57
58                 '+~' => ['g6 xbash', "user<>name exp<>and"], # overrides alias
59                 '+!' => ['g6 xbash', "cmd expand"],
60                 '+@' => ['g6 xbash', "host<>name exp<>and"],
61                 '+$' => ['g6 xbash', "variable expand"],
62                 '+^' => ['g4 xbash', "history expand"],
63                 '+/' => ['g1 xbash', "filename expand"],
64
65                 '^a' => ['g2', "begin of line"],
66                 '^b' => ['g2', "char back<>w<>ard<>s"],
67                 '+b' => ['g2', "word back<>w<>ard<>s"],
68                 '^c' => ['g8 xbash', "cancel comm<>and"],
69                 '+c' => ['g6', "capital<>ise word"],
70                 '^d' => ['g7', "delete char"],
71                 '+d' => ['g7 ring', "delete word rem<>ain<>der"],
72         #       '^e' => ['g9', "emacs mode"],
73                 '^e' => ['g2', "end of line"],
74                 '^f' => ['g2', "char forward"],
75                 '+f' => ['g2', "word forward"],
76                 '^g' => ['g8', "abort cmd, bell"],
77                 '^+g'=> \'^g',
78                 '^h' => ['g7', "back<>space"],
79                 '^+h'=> ['g7 ring', "delete bound word"], #TODO
80                 '^i' => ['g6', "auto<>complet<>e\n(tab)"],
81                 '^+i'=> \'^v^i',
82                 '^j' => \'^m',
83                 '^+j'=> ['g9', "vim mode"], #TODO: mode^+j
84                 '^k' => ['g7 ring', "delete till eol"],
85                 '^l' => ['g1', "clear screen"],
86                 '+l' => ['g6', "lowcase word"],
87                 '^m' => ['g4', "enter line\n(enter)"],
88                 '^+m'=> \'^+j',
89                 '^n' => ['g4', "history next"],
90                 '+n' => ['g4', "match history"],
91                 '^o' => ['g4 xbash', "enter and next"],
92                 '^p' => ['g4', "history back"],
93                 '+p' => ['g4', "rev match history"],
94                 '^q' => [undef, \'^v', "\nQuote"],  #TODO fix partial override
95                 '^r' => ['g4', "reverse history"],
96                 '+r' => ['g4', "full undo\nRevert"],
97                 '^+r'=> \'+r',
98                 '^s' => ['g4', "search history"],
99                 '^t' => ['g6', "move char forw<>ard\nTranspose char"],
100                 '+t' => ['g6', "move word forw<>ard\nTranspose word"],
101                 '^u' => ['g7 ring', "delete till bol"], # unix
102                 '+u' => ['g6', "upcase word"],
103                 '^v' => ['g8', "verbat<>im char"],
104                 '^w' => ['g7 ring', "delete word"], # unix
105                 '^x' => ['g9 arg mode^x', "extend<>ed"],
106                 '^y' => ['g4', "yank top"],
107                 '+y' => ['g4 ring', "rotate yank"],
108                 '^+y'=> ["yank arg", "yank arg"],
109                 '^z' => ['g8 xbash', "back<>ground"],
110         },
111
112         '^x' => {
113                 lead => "x̂",
114
115                 "\e" => ['g8 mode', "+"],
116
117                 '('  => ['g8', "start macro"],
118                 ')'  => ['g8', "end macro"],
119                 'e'  => ['g8', "run macro\nExecute"],
120                 '^e' => ['g6 xbash linkvi', "editor"],
121                 '^g' => \'^g',
122                 '^h' => \'^u',
123                 '^r' => ['g8', "reload inputrc"],
124                 '^u' => \'^_',
125                 '^x' => ['g2 v21', "swap cursor\neXchange"], # not in v2.0
126                 '^v' => ['g1 xbash', "shell version"],
127                 '^?' => \'^x^h',
128         },
129 },
130 }