]> git.lyx.org Git - lyx.git/blob - lib/bind/sciword.bind
more cyrillic encodings; support selection via numpad
[lyx.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 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
216 \bind "S-KP_Right"              "forward-select"
217 \bind "S-KP_Left"               "backward-select"
218 \bind "S-KP_Up"                 "up-select"
219 \bind "S-KP_Down"               "down-select"
220 \bind "S-C-KP_Right"            "word-forward-select"
221 \bind "S-C-KP_Left"             "word-backward-select"
222 \bind "S-C-KP_Up"               "paragraph-up-select"
223 \bind "S-C-KP_Down"             "paragraph-down-select"
224 \bind "S-KP_Home"               "line-begin-select"
225 \bind "S-KP_End"                "line-end-select"               
226 \bind "S-KP_Prior"              "screen-up-select"
227 \bind "S-KP_Next"               "screen-down-select"
228 \bind "S-C-KP_Home"             "buffer-begin-select"
229 \bind "S-C-KP_End"              "buffer-end-select"
230 \bind "S-C-KP_Prior"            "buffer-begin-select"
231 \bind "S-C-KP_Next"             "buffer-end-select"
232 \bind "C-KP_Insert"             "copy"
233 \bind "S-KP_Insert"             "paste"
234 \bind "S-KP_Delete"             "cut"
235
236 #
237 # Edit group
238 #
239
240 \bind "Delete"                 "delete-forward"
241 \bind "BackSpace"              "delete-backward"
242 \bind "C-Delete"               "word-delete-forward"
243 \bind "C-BackSpace"            "word-delete-backward"
244 \bind "Return"                 "break-paragraph"
245 \bind "M-Return"               "break-paragraph-keep-layout"
246 \bind "C-Return"               "break-line"
247 \bind "C-S-L"                  "ligature-break-insert"
248 \bind "C-space"                "protected-space-insert"
249 \bind "Escape"                 "cancel"
250 \bind "F9"                     "meta-prefix"
251
252 #
253 # Visible Menu access menu
254 #
255
256 #\bind "F10 d"                  "menu-open Documents"
257 #\bind "F10 e"                  "menu-open Edit"
258 #\bind "F10 f"                  "menu-open File"
259 #\bind "F10 h"                  "menu-open Help"
260 #\bind "F10 i"                  "menu-open Insert"
261 #\bind "F10 l"                  "menu-open Layout"
262 #\bind "F10 m"                  "menu-open Math"
263 #\bind "F10 o"                  "menu-open Options"
264
265
266
267 #
268 # File menu
269 #
270
271 #\bind "M-f a"                  "buffer-write-as"
272 #\bind "M-f c"                  "buffer-close"
273 #\bind "M-f n"                  "buffer-new"
274 #\bind "M-f l"                  "file-last"                      # Not yet implemented.
275 #\bind "M-f o"                  "file-open"
276 #\bind "M-f p"                  "buffer-print"
277 #\bind "M-f q"                  "lyx-quit"
278 #\bind "M-f r"                  "buffer-update dvi"
279         # Obsolete
280 #\bind "M-f s"                  "buffer-write"
281 #\bind "M-f t"                  "buffer-update dvi"
282
283 #\bind "M-f x"                  "buffer-view dvi"
284 #\bind "M-f g"                  "buffer-view ps"
285 #\bind "M-f space"              "menu-open File"
286
287
288 #
289 # Edit menu
290 #
291
292 ##\bind "M-e b"                  "table"                         # Not yet implemented!
293 #\bind "M-e c"                  "cut"
294 #\bind "M-e e"                  "error-next"
295 #\bind "M-e f"                  "find-replace"
296 #\bind "M-e k"                  "line-delete-forward"
297 #\bind "M-e m"                  "mark-on"
298 #\bind "M-e S-M"                "mark-off"
299 #\bind "M-e n"                  "note-next"
300 #\bind "M-e o"                  "copy"
301 #\bind "M-e p"                  "paste"
302 #\bind "M-e r"                  "redo"
303 #\bind "M-e s"                  "spellchecker"
304 #\bind "M-e t"                  "toc-update"
305 #\bind "M-e u"                  "undo"
306 #\bind "M-e space"              "menu-open Edit"
307
308
309 #
310 # Layout menu
311 #
312
313 #\bind "M-l c"                  "layout-character"
314 #\bind "M-l p"                  "layout-paragraph"
315 #\bind "M-l d"                  "layout-document"
316 #\bind "M-l q"                  "layout-quotes"
317 #\bind "M-l l"                  "layout-preamble"
318 #\bind "M-l e"                  "font-emph"
319 #\bind "M-l n"                  "font-smallcaps"
320 #\bind "M-l b"                  "font-bold"
321 #\bind "M-l t"                  "ert-insert"
322 #\bind "M-l v"                  "depth-increment"
323 #\bind "M-l space"              "menu-open Layout"
324
325
326
327 #
328 # Insert menu
329 #
330
331 #\bind "M-i c"                  "citation-insert"
332 #\bind "M-i f"                  "footnote-insert"
333 #\bind "M-i h"                  "hfill-insert"
334 #\bind "M-i m"                  "marginpar-insert"
335 #\bind "M-i n"                  "note-insert"
336 #\bind "M-i l"                  "label-insert"
337 #\bind "M-i r"                  "reference-insert"
338 #\bind "M-i minus"              "hyphenation-point-insert"
339 #\bind "M-i apostrophe"         "quote-insert"
340 #\bind "M-i S-quotedbl"         "quote-insert"
341 #\bind "M-i space"              "menu-open Insert"
342
343
344
345 #
346 # Options menu
347 #
348
349 #\bind "M-o f"                  "screen-font-options"           # Not yet implemented!
350 #\bind "M-o s"                  "spellcheck-options"            # Not yet implemented!
351 #\bind "M-o k"                  "keyboard-options"              # Not yet implemented!
352 #\bind "M-o l"                  "latex-options"                 # Not yet implemented!
353 #\bind "M-o space"              "menu-open Options"
354
355
356
357 #
358 # Documents menu
359 #
360
361 #\bind "M-d p"                  "buffer-previous"
362 #\bind "M-d space"              "menu-open Documents"
363
364
365
366 #
367 # Help menu
368 #
369
370 #\bind "M-h d"                  "help-documentation"            # Not yet implemented!
371 #\bind "M-h o"                  "help-copyright"                # Not yet implemented!
372 #\bind "M-h w"                  "help-warranty"                 # Not yet implemented!
373 #\bind "M-h c"                  "help-credits"                  # Not yet implemented!
374 #\bind "M-h v"                  "help-version"                  # Not yet implemented!
375 #\bind "M-h space"              "menu-open Help"
376
377
378
379 #
380 # Font size menu
381 #
382
383 \bind "M-s S-A"                "font-size largest"             # \LARGE
384 \bind "M-s g"                  "font-size giant"               # \Huge
385 \bind "M-s h"                  "font-size huge"                # \huge
386 \bind "M-s S-H"                "font-size giant"               # \Huge
387 \bind "M-s l"                  "font-size large"               # \large
388 \bind "M-s S-L"                "font-size larger"              # \Large
389 \bind "M-s n"                  "font-size normal"              # \normalsize
390 \bind "M-s s"                  "font-size small"               # \small
391 \bind "M-s t"                  "font-size tiny"                # \tiny
392
393 \bind "M-s 1"                  "font-size tiny"
394 \bind "M-s 2"                  "font-size small"
395 \bind "M-s 3"                  "font-size normal"
396 \bind "M-s 4"                  "font-size large"
397 \bind "M-s 5"                  "font-size larger"
398 \bind "M-s 6"                  "font-size largest"
399 \bind "M-s 7"                  "font-size huge"
400 \bind "M-s 8"                  "font-size giant"
401
402
403
404 #
405 # Alignment menu
406 #
407
408 #\bind "M-a l"                  "para-align left"               # Not yet implemented!
409 #\bind "M-a r"                  "para-align right"              # Not yet implemented!
410 #\bind "M-a c"                  "para-align center"             # Not yet implemented!
411 #\bind "M-a b"                  "para-align block"              # Not yet implemented!
412 #\bind "M-a f"                  "para-align block"              # Not yet implemented!
413 #\bind "M-a d"                  "para-align default"            # Not yet implemented!
414
415
416
417 #
418 # Paragraph style menu
419 #
420
421 \bind "M-p c"                  "drop-layouts-choice"
422 \bind "M-p 1"                  "layout Chapter"
423 \bind "M-p 2"                  "layout Section"
424 \bind "M-p 3"                  "layout Subsection"
425 \bind "M-p 4"                  "layout Subsubsection"
426 \bind "M-p 5"                  "layout Paragraph"
427 \bind "M-p 6"                  "layout Subparagraph"
428 \bind "M-p b"                  "layout Itemize"                        # bulleted list
429 \bind "M-p d"                  "layout Description"
430 \bind "M-p e"                  "layout Enumerate"                      # numbered list
431 \bind "M-p i"                  "layout Itemize"                        # bulleted list
432 \bind "M-p l"                  "layout List"
433 \bind "M-p n"                  "layout Enumerate"                      # numbered list
434 \bind "M-p p"                  "layout Lyx-Code"
435 \bind "M-p q"                  "layout Quote"
436 \bind "M-p S-Q"                "layout Quotation"
437 \bind "M-p s"                  "layout Standard"
438 \bind "M-p t"                  "layout Title"
439 \bind "M-p S-at"               "layout Section*"                       # M-p S-2
440 \bind "M-p S-dollar"           "layout Subsubsection*"                 # M-p S-4
441 \bind "M-p S-numbersign"       "layout Subsection*"                    # M-p S-3
442
443 \bind "M-p Left"               "depth-decrement"
444 \bind "M-p Right"              "depth-increment"
445
446
447
448 #
449 # Character style menu
450 #
451
452 \bind "M-c b"                  "font-bold"
453 #\bind "M-c c"                  "font-smallcaps"
454 \bind "M-c e"                  "font-emph"
455 \bind "M-c i"                  "font-emph"                                              # italics
456 \bind "M-c m"                  "math-mode"
457 \bind "M-c p"                  "font-code"
458 \bind "M-c r"                  "font-roman"
459 \bind "M-c s"                  "font-sans"
460 \bind "M-c t"                  "ert-insert"
461 \bind "M-c u"                  "font-underline"
462
463 \bind "M-c Down"               "word-lowcase"
464 \bind "M-c Up"                 "word-upcase"
465 \bind "M-c Right"              "word-capitalize"
466
467 \bind "M-c space"              "font-default"
468
469
470
471 #
472 # Keyboard menu
473 #
474
475 \bind "M-k 1"                  "keymap-primary"
476 \bind "M-k 2"                  "keymap-secondary"
477 \bind "M-k o"                  "keymap-off"
478 \bind "M-k t"                  "keymap-toggle"
479 \bind "M-k x"                  "keymap-off"
480
481 #
482 # Misc menu
483 #
484  
485 # this clashes with M-x so we can't use it. M-x is more
486 # important (reported by Serge Winitzki <winitzki@yahoo.com>)
487 # \bind "M-x c"                  "screen-recenter"
488
489 \bind "M-x"                     "command-execute"
490
491
492 \bind_file latinkeys.bind