keyboard: custom rows overrides in moderows attribute
[sheet.git] / 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 key => {
15         '+<' => "history start",
16         '+>' => "history end",
17         '+?' => "list complet<>ion<>s",
18         '^@' => "set mark",
19
20         '+#' => "prefix comm<>en<>t",
21         '+&' => "tilde expand",
22         '+*' => "complet<>e all",
23         '+.' => "insert last",
24
25         '^[' => "meta",
26         '+\\'=> "delete whitesp<>ace",
27         '^]' => "find char",
28         '^+]'=> "rev find char",
29         '^_' => "undo",
30
31         '+~' => "user<>name exp<>and",
32         '+!' => "cmd expand",
33         '+@' => "host<>name exp<>and",
34         '+$' => "variable expand",
35         '+^' => "history expand",
36         '+/' => "filename expand",
37
38         '^a' => "begin of line",
39         '^b' => "char back<>w<>ard<>s",
40         '+b' => "word back<>w<>ard<>s",
41         '^c' => "cancel comm<>and",
42         '+c' => "capital<>ise word",
43         '^d' => "delete char",
44         '+d' => "delete word rem<>ain<>der",
45 #       '^e' => "emacs mode",
46         '^e' => "end of line",
47         '^f' => "char forward",
48         '+f' => "word forward",
49         '^g' => "abort cmd, bell",
50         '^h' => "back<>space",
51         '^+h'=> "delete bound word",
52         '^i' => "auto<>complet<>e\n(tab)",
53         '^+j'=> "vim mode",
54         '^k' => "delete till eol",
55         '^l' => "clear screen",
56         '+l' => "lowcase word",
57         '^m' => "enter line\n(enter)",
58         '^n' => "history next",
59         '+n' => "match history",
60         '^o' => "enter and next",
61         '^p' => "history back",
62         '+p' => "rev match history",
63 #       '^q' => "\nQuote",  #TODO fix partial override
64         '^r' => "reverse history",
65         '+r' => "full undo\nRevert",
66         '^s' => "search history",
67         '^t' => "move char forw<>ard\nTranspose char",
68         '+t' => "move word forw<>ard\nTranspose word",
69         '^u' => "delete till bol", # unix
70         '+u' => "upcase word",
71         '^v' => "verbat<>im char",
72         '^w' => "delete word", # unix
73         '^x' => "extend<>ed",
74         '^y' => "yank top",
75         '+y' => "rotate yank",
76         '^+y'=> "yank arg",
77         '^z' => "back<>ground",
78
79         '^x('  => "start macro",
80         '^x)'  => "end macro",
81         '^xe'  => "run macro\nExecute",
82         '^x^e' => "editor",
83         '^x^r' => "reload inputrc",
84         '^x^x' => "swap cursor\neXchange",
85         '^x^v' => "shell version",
86
87         # globally label escape as meta key
88           "\e" => "+",
89         "^x\e" => "+",
90 },
91
92 mode => {
93         ''   => "emacs mode",
94         '^x' => "emacs ctrl-x bindings",
95 },
96
97 flag => {
98         g1 => [info    => "Info command: shows/does something without altering anything."],
99         g2 => [motion  => "Move the cursor."],
100         g4 => [history => "Replace contents involving kill ring, undo, or command history."],
101         g6 => [change  => "Alter current text (filtering or completion)."],
102         g7 => [delete  => "Remove text."],
103         g8 => [misc    => "Miscellaneous commands."],
104         g9 => [mode    => "Additional key functionality (click to view)."],
105
106         arg => ["key<arg>" => "Commands with a dot need a char argument afterwards."],
107         'v21 new' => ["&gt;v2.0" => "Unavailable before readline version 2.1 (1997)."],
108         'xbash ext' => ["bash" => "Default assignment in Bash shells, but not common readline."],
109 },
110
111 def => {
112         '' => {
113                 "\e" => 'g8',
114
115                 '+<' => 'g4',
116                 '+=' => '=+?', #TODO: v21 # emacs, not in v2.0
117                 '+>' => 'g4',
118                 '^?' => '=^h',
119                 '+?' => 'g1',
120                 '^@' => 'g8 v21', # not in v2.0
121
122                 '+#' => 'g6 v21', # not in v2.0
123                 '+&' => 'g6',
124                 '+*' => 'g6 v21', # not in v2.0
125                 '+.' => 'g4',
126                 '+~' => '=+&amp;', # emacs
127
128                 '^[' => 'g8',
129                 '^+['=> '=^i',
130                 '+\\'=> 'g7',
131                 '^]' => 'g2 arg v21', # not in v2.0
132                 '^+]'=> 'g2 arg v21', # not in v2.0
133                 '^_' => 'g4',
134                 '+_' => '=+.',
135
136                 '+~' => 'g6 xbash', # common emacs => '=+&'
137                 '+!' => 'g6 xbash',
138                 '+@' => 'g6 xbash',
139                 '+$' => 'g6 xbash',
140                 '+^' => 'g4 xbash',
141                 '+/' => 'g1 xbash',
142
143                 '^a' => 'g2',
144                 '^b' => 'g2',
145                 '+b' => 'g2',
146                 '^c' => 'g8 xbash',
147                 '+c' => 'g6',
148                 '^d' => 'g7',
149                 '+d' => 'g7 ring',
150         #       '^e' => 'g9',
151                 '^e' => 'g2',
152                 '^f' => 'g2',
153                 '+f' => 'g2',
154                 '^g' => 'g8',
155                 '^+g'=> '=^g',
156                 '^h' => 'g7',
157                 '^+h'=> 'g7 ring', #TODO
158                 '^i' => 'g6',
159                 '^+i'=> '=^v^i',
160                 '^j' => '=^m',
161                 '^+j'=> 'g9', #TODO: mode^+j
162                 '^k' => 'g7 ring',
163                 '^l' => 'g1',
164                 '+l' => 'g6',
165                 '^m' => 'g4',
166                 '^+m'=> '=^+j',
167                 '^n' => 'g4',
168                 '+n' => 'g4',
169                 '^o' => 'g4 xbash',
170                 '^p' => 'g4',
171                 '+p' => 'g4',
172                 '^q' => '=^v',
173                 '^r' => 'g4',
174                 '+r' => 'g4',
175                 '^+r'=> '=+r',
176                 '^s' => 'g4',
177                 '^t' => 'g6',
178                 '+t' => 'g6',
179                 '^u' => 'g7 ring',
180                 '+u' => 'g6',
181                 '^v' => 'g8',
182                 '^w' => 'g7 ring',
183                 '^x' => 'g9 arg mode^x',
184                 '^y' => 'g4',
185                 '+y' => 'g4 ring',
186                 '^+y'=> "yank arg",
187                 '^z' => 'g8 xbash',
188         },
189
190         '^x' => {
191                 lead => "x̂",
192
193                 "\e" => 'g8 mode',
194
195                 '('  => 'g8',
196                 ')'  => 'g8',
197                 'e'  => 'g8',
198                 '^e' => 'g6 xbash linkvi',
199                 '^g' => '=^g',
200                 '^h' => '=^u',
201                 '^r' => 'g8',
202                 '^u' => '=^_',
203                 '^x' => 'g2 v21', # not in v2.0
204                 '^v' => 'g1 xbash',
205                 '^?' => '=^x^h',
206         },
207 },
208 }