]> git.lyx.org Git - features.git/blob - lib/bind/sciword.bind
fix insertion of raw double quote, reading of Info inset, initial width of collapsed...
[features.git] / lib / bind / sciword.bind
1 # This file is part of LyX
2
3 # LyX keyboard definitions similar to those of Scientific Word.
4 # Prepared by Serge Winitzki. Version 1.2
5
6 # Tip: to find the "LyX name" for a key, look at the status bar after
7 # typing some non-existent key combination. E.g. to find how "Ctrl-&" is
8 # referenced, press Ctrl-S Ctrl-&: the status bar shows "C-s S-C-ampersand."
9
10 #\bind "C-a"                    "------"
11 #\bind "C-b"                    "font-bold"
12
13 # Copy, paste, etc.: more familiar keys
14 \bind "C-c"     "copy"
15
16 # Display equation toggle: type it in a displayed equation to convert it
17 # back to an inline equation
18 # Sciword mnemonic.
19 \bind "C-d"     "math-display"
20
21 #\bind "C-e"    "------"
22 # Greek for only one character. "math-greek-toggle" is the persistent Greek
23 # toggle which nobody really needs when typing math.
24 # Sciword mnemonic.
25 \bind "C-f"     "math-insert frac"
26 \bind "C-g"     "math-greek"
27
28 # Do we need this?
29 #\bind "C-h"    "hyphenation-point-insert"
30
31 # Sciword mnemonic.
32 \bind "C-i"     "math-insert int"
33
34 #\bind "C-j"    "------"
35
36 \bind "C-k"     "line-delete-forward"
37 \bind "C-l"     "screen-recenter"
38
39 # Toggle: in text mode, switch to math, and vice versa. Also C-t.
40 \bind "C-m"     "math-mode"
41 # C-n is numbering equations now. Sciword had "C-Tab" mnemonic which conflicts with many things.
42 # Numbering equations. Should perhaps simplify math-number and math-nonumber into one command since they are used in very different contexts. This and also math-macro stuff should be available in the Lyx menus!
43 \bind "C-n"     "math-number"
44 \bind "S-C-n" "math-nonumber"
45 \bind "C-o"     "inset-toggle"
46
47 # Insert a quote character. Do I need this?
48 # Probably, since we need a way to get a raw quote
49 \bind "C-q"     "self-insert \""
50
51 # Sciword mnemonic.
52 \bind "C-r"     "math-insert sqrt"
53
54 # This combination is now a gateway to math symbols (C-s ...)
55 #\bind "C-s"    "------"
56
57 # Sciword mnemonic for going between text and math modes.
58 \bind "C-t"     "math-mode"
59 \bind "C-u"     "font-underline"
60 \bind "C-v"     "paste"
61 \bind "C-w"     "buffer-close"
62 \bind "C-x"     "cut"
63 \bind "C-z"     "undo"
64 \bind "S-C-z"   "redo"
65
66
67 # This combination makes an umlaut accent now.
68 #\bind "S-C-quotedbl"           "quote-insert"
69
70 # Bracket delimiters. Sciword mnemonic is to press Control-<bracket key>
71
72 \bind "C-9"     "math-delim ( )"
73 \bind "S-C-parenleft"   "math-delim ( )"
74 \bind "C-0"     "math-delim ( )"
75 \bind "S-C-parenright"  "math-delim ( )"
76
77 \bind "C-bracketleft"           "math-delim [ ]"
78 \bind "C-bracketright"  "math-delim [ ]"
79 \bind "C-S-less"                "math-delim langle rangle"
80 \bind "C-S-greater"             "math-delim langle rangle"
81
82 # The bar bracket: on some keyboards, e.g. British, the bar character is
83 # bound to an Alt-something and on some wayward Unices to "brokenbar".
84 \bind "C-S-bar"         "math-delim | |"
85 \bind "C-S-brokenbar"   "math-delim | |"
86 \bind "C-M-bar"         "math-delim | |"
87
88 \bind "S-C-braceleft"           "math-delim { }"
89 \bind "S-C-braceright"          "math-delim { }"
90
91 # Accents by Sciword mnemonics. Mostly press Ctrl-<accent key>
92 # e.g. Ctrl-. for overdot, Ctrl-' for acute accent, Ctrl-~ for tilde etc.
93 # Some of them seem to work only in math mode?
94
95 \bind "C-period"        "accent-dot"
96 \bind "S-C-colon"       "math-insert ddot"
97 \bind "C-quoteleft"     "accent-grave"
98 \bind "S-C-asciitilde"  "accent-tilde"
99 \bind "S-C-quotedbl"    "accent-umlaut"
100 \bind "C-apostrophe"    "accent-acute"
101 \bind "S-C-asciicircum" "accent-circumflex"
102 \bind "C-equal"         "accent-vector"
103 # Why is it not "accent-bar"?
104 \bind "C-minus" "math-insert bar"
105 # What is "accent-underbar"?
106 #\bind "S-C-underscore" "accent-underbar"
107
108 # Function keys.
109
110 #\bind "F1"     "help"  # Not yet implemented!
111 #\bind "C-F1"                   "help-context"                  # Not yet implemented!
112 \bind "F2"                     "buffer-write"
113 \bind "F3"                     "find-replace"
114
115 \bind "C-F4"                   "buffer-close"
116 \bind "M-F4"                   "lyx-quit"
117 # F4 to F8 are used to switch fonts. Sciword mnemonic.
118 \bind "F4"                     "font-default"
119 \bind "F5"                     "font-bold"
120 \bind "F6"                     "font-emph"
121 \bind "F7"                     "font-code"
122 \bind "F8"                     "font-noun"
123 # F9 bound below as meta-prefix (useful e.g. if the keyboard doesn't have a working ALT).
124 #\bind "F9"                     "------"
125 #\bind "F10"                    "------"
126
127 #
128 # Math menu (unmodified)
129 #
130
131 \bind "M-m f"                   "math-insert frac"
132 \bind "M-m i"                   "math-insert int"
133 \bind "M-m o"                   "math-insert oint"
134 \bind "M-m p"                  "math-insert partial"
135 \bind "M-m s"                  "math-insert sqrt"
136 \bind "M-m S-S"                "math-insert sum"
137 \bind "M-m l"                  "math-limits"
138 \bind "M-m n"                  "math-number"
139 \bind "M-m v"                  "accent-vector"
140 \bind "M-m space"              "menu-open Math"
141
142 # Sciword mnemonics for math editing:
143
144 \bind "M-apostrophe"    "math-insert prime"
145 \bind "C-Up"            "math-insert ^"
146 \bind "C-Down"          "math-insert _"
147 \bind "C-s d"           "math-insert partial"
148 \bind "C-s e"           "math-insert sum"
149 \bind "C-s p"           "math-insert prod"
150 \bind "C-s i"           "math-insert infty"
151 \bind "C-s x"           "math-insert times"
152
153 # My own embellishments for symbols I use often.
154
155 #I'd like to combine math-insert ^ and math-insert prime, but don't know how.
156
157 \bind "C-s apostrophe"  "math-insert prime"
158 \bind "C-s S-plus"      "math-insert dagger"
159 \bind "C-s equal"       "math-insert equiv"
160 \bind "M-equal"         "math-insert approx"
161 \bind "M-minus"         "math-insert sim"
162 \bind "C-minus"         "math-insert rightarrow"
163 \bind "S-M-less"        "math-insert leq"
164 \bind "S-M-greater"     "math-insert geq"
165 \bind "C-s S-less"      "math-insert ll"
166 \bind "C-s S-greater"   "math-insert gg"
167
168         ############################
169 ######### Almost no changes below. #########
170         ############################
171
172 #
173 # Motion group
174 #
175
176 \bind "Right"                  "char-forward"
177 \bind "Left"                   "char-backward"
178 \bind "Up"                     "up"
179 \bind "Down"                   "down"
180 \bind "C-Right"                "word-forward"
181 \bind "C-Left"                 "word-backward"
182 # These are now used to insert superscripts and subscripts.
183 #\bind "C-Up"                   "paragraph-up"
184 #\bind "C-Down"                 "paragraph-down"
185 \bind "Home"                   "line-begin"
186 \bind "End"                    "line-end"
187 \bind "Prior"                  "screen-up"
188 \bind "Next"                   "screen-down"
189 \bind "C-Home"                 "buffer-begin"
190 \bind "C-End"                  "buffer-end"
191 \bind "Tab"                    "tab-forward"
192
193 #
194 # Motion + select group
195 #
196
197 \bind "S-Right"                "forward-select"
198 \bind "S-Left"                 "backward-select"
199 \bind "S-Up"                   "up-select"
200 \bind "S-Down"                 "down-select"
201 \bind "S-C-Right"              "word-forward-select"
202 \bind "S-C-Left"               "word-backward-select"
203 \bind "S-C-Up"                 "paragraph-up-select"
204 \bind "S-C-Down"               "paragraph-down-select"
205 \bind "S-Home"                 "line-begin-select"
206 \bind "S-End"                  "line-end-select"
207 \bind "S-Prior"                "screen-up-select"
208 \bind "S-Next"                 "screen-down-select"
209 \bind "S-C-Home"               "buffer-begin-select"
210 \bind "S-C-End"                "buffer-end-select"
211 \bind "C-Insert"               "copy"
212 \bind "S-Insert"               "paste"
213 \bind "S-Delete"               "cut"
214
215 #
216 # Edit group
217 #
218
219 \bind "Delete"                 "delete-forward"
220 \bind "BackSpace"              "delete-backward"
221 \bind "C-Delete"               "word-delete-forward"
222 \bind "C-BackSpace"            "word-delete-backward"
223 \bind "Return"                 "break-paragraph"
224 \bind "M-Return"               "break-paragraph-keep-layout"
225 \bind "C-Return"               "break-line"
226 \bind "C-space"                "protected-space-insert"
227 \bind "Escape"                 "cancel"
228 \bind "F9"                     "meta-prefix"
229
230 #
231 # Visible Menu access menu
232 #
233
234 #\bind "F10 d"                  "menu-open Documents"
235 #\bind "F10 e"                  "menu-open Edit"
236 #\bind "F10 f"                  "menu-open File"
237 #\bind "F10 h"                  "menu-open Help"
238 #\bind "F10 i"                  "menu-open Insert"
239 #\bind "F10 l"                  "menu-open Layout"
240 #\bind "F10 m"                  "menu-open Math"
241 #\bind "F10 o"                  "menu-open Options"
242
243
244
245 #
246 # File menu
247 #
248
249 #\bind "M-f a"                  "buffer-write-as"
250 #\bind "M-f c"                  "buffer-close"
251 #\bind "M-f n"                  "buffer-new"
252 #\bind "M-f l"                  "file-last"                      # Not yet implemented.
253 #\bind "M-f o"                  "file-open"
254 #\bind "M-f p"                  "buffer-print"
255 #\bind "M-f q"                  "lyx-quit"
256 #\bind "M-f r"                  "buffer-update dvi"
257         # Obsolete
258 #\bind "M-f s"                  "buffer-write"
259 #\bind "M-f t"                  "buffer-update dvi"
260
261 #\bind "M-f x"                  "buffer-view dvi"
262 #\bind "M-f g"                  "buffer-view ps"
263 #\bind "M-f space"              "menu-open File"
264
265
266 #
267 # Edit menu
268 #
269
270 ##\bind "M-e b"                  "table"                         # Not yet implemented!
271 #\bind "M-e c"                  "cut"
272 #\bind "M-e e"                  "error-next"
273 #\bind "M-e f"                  "find-replace"
274 #\bind "M-e k"                  "line-delete-forward"
275 #\bind "M-e m"                  "mark-on"
276 #\bind "M-e S-M"                "mark-off"
277 #\bind "M-e n"                  "note-next"
278 #\bind "M-e o"                  "copy"
279 #\bind "M-e p"                  "paste"
280 #\bind "M-e r"                  "redo"
281 #\bind "M-e s"                  "spellchecker"
282 #\bind "M-e t"                  "toc-update"
283 #\bind "M-e u"                  "undo"
284 #\bind "M-e space"              "menu-open Edit"
285
286
287 #
288 # Layout menu
289 #
290
291 #\bind "M-l c"                  "layout-character"
292 #\bind "M-l p"                  "layout-paragraph"
293 #\bind "M-l d"                  "layout-document"
294 #\bind "M-l q"                  "layout-quotes"
295 #\bind "M-l l"                  "layout-preamble"
296 #\bind "M-l e"                  "font-emph"
297 #\bind "M-l n"                  "font-smallcaps"
298 #\bind "M-l b"                  "font-bold"
299 #\bind "M-l t"                  "ert-insert"
300 #\bind "M-l v"                  "depth-next"
301 #\bind "M-l space"              "menu-open Layout"
302
303
304
305 #
306 # Insert menu
307 #
308
309 #\bind "M-i c"                  "citation-insert"
310 #\bind "M-i f"                  "footnote-insert"
311 #\bind "M-i h"                  "hfill-insert"
312 #\bind "M-i m"                  "marginpar-insert"
313 #\bind "M-i n"                  "note-insert"
314 #\bind "M-i l"                  "label-insert"
315 #\bind "M-i r"                  "reference-insert"
316 #\bind "M-i minus"              "hyphenation-point-insert"
317 #\bind "M-i apostrophe"         "quote-insert"
318 #\bind "M-i S-quotedbl"         "quote-insert"
319 #\bind "M-i space"              "menu-open Insert"
320
321
322
323 #
324 # Options menu
325 #
326
327 #\bind "M-o f"                  "screen-font-options"           # Not yet implemented!
328 #\bind "M-o s"                  "spellcheck-options"            # Not yet implemented!
329 #\bind "M-o k"                  "keyboard-options"              # Not yet implemented!
330 #\bind "M-o l"                  "latex-options"                 # Not yet implemented!
331 #\bind "M-o space"              "menu-open Options"
332
333
334
335 #
336 # Documents menu
337 #
338
339 #\bind "M-d p"                  "buffer-previous"
340 #\bind "M-d space"              "menu-open Documents"
341
342
343
344 #
345 # Help menu
346 #
347
348 #\bind "M-h d"                  "help-documentation"            # Not yet implemented!
349 #\bind "M-h o"                  "help-copyright"                # Not yet implemented!
350 #\bind "M-h w"                  "help-warranty"                 # Not yet implemented!
351 #\bind "M-h c"                  "help-credits"                  # Not yet implemented!
352 #\bind "M-h v"                  "help-version"                  # Not yet implemented!
353 #\bind "M-h space"              "menu-open Help"
354
355
356
357 #
358 # Font size menu
359 #
360
361 \bind "M-s S-A"                "font-size largest"             # \LARGE
362 \bind "M-s g"                  "font-size giant"               # \Huge
363 \bind "M-s h"                  "font-size huge"                # \huge
364 \bind "M-s S-H"                "font-size giant"               # \Huge
365 \bind "M-s l"                  "font-size large"               # \large
366 \bind "M-s S-L"                "font-size larger"              # \Large
367 \bind "M-s n"                  "font-size normal"              # \normalsize
368 \bind "M-s s"                  "font-size small"               # \small
369 \bind "M-s t"                  "font-size tiny"                # \tiny
370
371 \bind "M-s 1"                  "font-size tiny"
372 \bind "M-s 2"                  "font-size small"
373 \bind "M-s 3"                  "font-size normal"
374 \bind "M-s 4"                  "font-size large"
375 \bind "M-s 5"                  "font-size larger"
376 \bind "M-s 6"                  "font-size largest"
377 \bind "M-s 7"                  "font-size huge"
378 \bind "M-s 8"                  "font-size giant"
379
380
381
382 #
383 # Alignment menu
384 #
385
386 #\bind "M-a l"                  "para-align left"               # Not yet implemented!
387 #\bind "M-a r"                  "para-align right"              # Not yet implemented!
388 #\bind "M-a c"                  "para-align center"             # Not yet implemented!
389 #\bind "M-a b"                  "para-align block"              # Not yet implemented!
390 #\bind "M-a f"                  "para-align block"              # Not yet implemented!
391 #\bind "M-a d"                  "para-align default"            # Not yet implemented!
392
393
394
395 #
396 # Paragraph style menu
397 #
398
399 \bind "M-p c"                  "drop-layouts-choice"
400 \bind "M-p 1"                  "layout Chapter"
401 \bind "M-p 2"                  "layout Section"
402 \bind "M-p 3"                  "layout Subsection"
403 \bind "M-p 4"                  "layout Subsubsection"
404 \bind "M-p 5"                  "layout Paragraph"
405 \bind "M-p 6"                  "layout Subparagraph"
406 \bind "M-p b"                  "layout Itemize"                        # bulleted list
407 \bind "M-p d"                  "layout Description"
408 \bind "M-p e"                  "layout Enumerate"                      # numbered list
409 \bind "M-p i"                  "layout Itemize"                        # bulleted list
410 \bind "M-p l"                  "layout List"
411 \bind "M-p n"                  "layout Enumerate"                      # numbered list
412 \bind "M-p p"                  "layout Lyx-Code"
413 \bind "M-p q"                  "layout Quote"
414 \bind "M-p S-Q"                "layout Quotation"
415 \bind "M-p s"                  "layout Standard"
416 \bind "M-p t"                  "layout Title"
417 \bind "M-p S-at"               "layout Section*"                       # M-p S-2
418 \bind "M-p S-dollar"           "layout Subsubsection*"                 # M-p S-4
419 \bind "M-p S-numbersign"       "layout Subsection*"                    # M-p S-3
420
421 \bind "M-p Left"               "depth-decrement"
422 \bind "M-p Right"              "depth-increment"
423
424
425
426 #
427 # Character style menu
428 #
429
430 \bind "M-c b"                  "font-bold"
431 #\bind "M-c c"                  "font-smallcaps"
432 \bind "M-c e"                  "font-emph"
433 \bind "M-c i"                  "font-emph"                                              # italics
434 \bind "M-c m"                  "math-mode"
435 \bind "M-c p"                  "font-code"
436 \bind "M-c r"                  "font-roman"
437 \bind "M-c s"                  "font-sans"
438 \bind "M-c t"                  "ert-insert"
439 \bind "M-c u"                  "font-underline"
440
441 \bind "M-c Down"               "word-lowcase"
442 \bind "M-c Up"                 "word-upcase"
443 \bind "M-c Right"              "word-capitalize"
444
445 \bind "M-c space"              "font-default"
446
447
448
449 #
450 # Keyboard menu
451 #
452
453 \bind "M-k 1"                  "keymap-primary"
454 \bind "M-k 2"                  "keymap-secondary"
455 \bind "M-k o"                  "keymap-off"
456 \bind "M-k t"                  "keymap-toggle"
457 \bind "M-k x"                  "keymap-off"
458
459
460
461 #
462 # Misc menu
463 #
464
465 \bind "M-x c"                  "screen-recenter"
466
467 \bind_file latinkeys.bind