]> git.lyx.org Git - lyx.git/blob - lib/bind/sciword.bind
A slightly buggy lfun all-insets-toggle.
[lyx.git] / lib / bind / sciword.bind
1 # -*- text -*-
2
3 # file sciword.bind
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6
7 # author Serge Winitzki
8
9 # Full author contact details are available in file CREDITS.
10
11 # LyX keyboard definitions similar to those of Scientific Word.
12
13 #\bind "C-a"                    "------"
14 #\bind "C-b"                    "font-bold"
15
16 # Copy, paste, etc.: more familiar keys
17 \bind "C-c"     "copy"
18
19 # Display equation toggle: type it in a displayed equation to convert it
20 # back to an inline equation
21 # Sciword mnemonic.
22 \bind "C-d"     "math-display"
23
24 #\bind "C-e"    "------"
25 # Sciword mnemonic.
26 \bind "C-f"     "math-insert \frac"
27
28 # Since the toggles don't work in 1.2.0, let's define all letters.
29 # lowercase math Greek
30 \bind "C-g a" "math-insert \alpha"
31 \bind "C-g b" "math-insert \beta"
32 \bind "C-g g" "math-insert \gamma"
33 \bind "C-g d" "math-insert \delta"
34 \bind "C-g e" "math-insert \varepsilon"
35 \bind "C-g C-e" "math-insert \epsilon"
36 \bind "C-g z" "math-insert \zeta"
37 \bind "C-g h" "math-insert \eta"
38 \bind "C-g q" "math-insert \theta"
39 \bind "C-g C-q" "math-insert \vartheta"
40 \bind "C-g i" "math-insert \iota"
41 \bind "C-g k" "math-insert \kappa"
42 \bind "C-g l" "math-insert \lambda"
43 \bind "C-g m" "math-insert \mu"
44 \bind "C-g n" "math-insert \nu"
45 \bind "C-g x" "math-insert \xi"
46 \bind "C-g p" "math-insert \pi"
47 \bind "C-g C-p" "math-insert \varpi"
48 \bind "C-g r" "math-insert \rho"
49 \bind "C-g s" "math-insert \sigma"
50 \bind "C-g C-s" "math-insert \varsigma"
51 \bind "C-g t" "math-insert \tau"
52 \bind "C-g v" "math-insert \upsilon"
53 \bind "C-g f" "math-insert \phi"
54 \bind "C-g c" "math-insert \chi"
55 \bind "C-g y" "math-insert \psi"
56 \bind "C-g w" "math-insert \omega"
57
58 # uppercase math Greek
59 \bind "C-g S-G" "math-insert \Gamma"
60 \bind "C-g S-D" "math-insert \Delta"
61 \bind "C-g S-Q" "math-insert \Theta"
62 \bind "C-g S-L" "math-insert \Lambda"
63 \bind "C-g S-X" "math-insert \Xi"
64 \bind "C-g S-P" "math-insert \Pi"
65 \bind "C-g S-S" "math-insert \Sigma"
66 \bind "C-g S-V" "math-insert \Upsilon"
67 \bind "C-g S-F" "math-insert \Phi"
68 \bind "C-g S-Y" "math-insert \Psi"
69 \bind "C-g S-W" "math-insert \Omega"
70
71
72 # Do we need this?
73 #\bind "C-h"    "hyphenation-point-insert"
74
75 # Sciword mnemonic.
76 \bind "C-i"     "math-insert \int"
77
78 #\bind "C-j"    "------"
79
80 \bind "C-k"     "line-delete-forward"
81 \bind "C-l"     "screen-recenter"
82
83 # Toggle: in text mode, switch to math, and vice versa. Also C-t.
84 \bind "C-m"     "math-mode"
85 # C-n is numbering equations now. Sciword had "C-Tab" mnemonic which conflicts with many things.
86 # 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!
87 \bind "C-n"     "math-number"
88 \bind "S-C-N" "math-nonumber"
89
90 \bind "C-o"     "file-open"
91
92 # Insert a quote character. Do I need this?
93 # Probably, since we need a way to get a raw quote
94 \bind "C-q"     "self-insert \""
95
96 # Sciword mnemonic.
97 \bind "C-r"     "math-insert \sqrt"
98 \bind "S-C-R"   "math-insert \root"
99
100 # This combination is now a gateway to math symbols (C-s ...)
101 #\bind "C-s"    "------"
102
103 # Sciword mnemonic for going between text and math modes.
104 \bind "C-t"     "math-mode"
105
106 \bind "C-u"     "font-underline"
107 \bind "C-v"     "paste"
108 \bind "C-w"     "buffer-close"
109 \bind "C-x"     "cut"
110 \bind "C-z"     "undo"
111 \bind "S-C-Z"   "redo"
112
113
114 # This combination makes an umlaut accent now.
115 #\bind "S-C-quotedbl"           "quote-insert"
116 \bind "S-M-quotedbl"           "quote-insert single"
117
118 # Bracket delimiters. Sciword mnemonic is to press Control-<bracket key>
119
120 \bind "C-9"     "math-delim ( )"
121 \bind "S-C-parenleft"   "math-delim ( )"
122 \bind "C-0"     "math-delim ( )"
123 \bind "S-C-parenright"  "math-delim ( )"
124
125 \bind "C-bracketleft"           "math-delim [ ]"
126 \bind "C-bracketright"  "math-delim [ ]"
127 \bind "C-S-less"                "math-delim langle rangle"
128 \bind "C-S-greater"             "math-delim langle rangle"
129
130 # The bar bracket: on some keyboards, e.g. British, the bar character is
131 # bound to an Alt-something and on some wayward Unices to "brokenbar".
132 \bind "C-S-bar"         "math-delim | |"
133 \bind "C-S-brokenbar"   "math-delim | |"
134 \bind "C-M-bar"         "math-delim | |"
135
136 \bind "S-C-braceleft"           "math-delim { }"
137 \bind "S-C-braceright"          "math-delim { }"
138
139 # Accents by Sciword mnemonics. Mostly press Ctrl-<accent key>
140 # e.g. Ctrl-. for overdot, Ctrl-' for acute accent, Ctrl-~ for tilde etc.
141 # Some of them work only in math mode
142
143 \bind "C-period"        "accent-dot"
144 \bind "C-comma" "math-insert \dot"
145 \bind "S-C-colon"       "math-insert \ddot"
146 \bind "C-quoteleft"     "accent-grave"
147 \bind "S-C-asciitilde"  "accent-tilde"
148 \bind "S-C-quotedbl"    "accent-umlaut"
149 \bind "C-apostrophe"    "accent-acute"
150 \bind "S-C-asciicircum" "accent-circumflex"
151 # accent-vector has been changed?
152 #\bind "C-equal"                "accent-vector"
153 # Why is it not "accent-bar"?
154 \bind "C-minus" "math-insert \bar"
155 # What is "accent-underbar"?
156 #\bind "S-C-underscore" "accent-underbar"
157
158 # Function keys.
159
160 #\bind "F1"     "help"  # Not yet implemented!
161 #\bind "C-F1"                   "help-context"                  # Not yet implemented!
162 \bind "F2"                     "buffer-write"
163 \bind "S-F2"                     "buffer-export latex"
164 \bind "F3"                     "find-replace"
165
166 \bind "C-F4"                   "buffer-close"
167 \bind "M-F4"                   "lyx-quit"
168 # F4 to F8 are used to switch fonts. Sciword mnemonic.
169 \bind "F4"                     "font-default"
170 \bind "F5"                     "font-bold"
171 \bind "F6"                     "font-emph"
172 \bind "F7"                     "font-code"
173 \bind "F8"                     "font-noun"
174 # F9 bound below as meta-prefix (useful e.g. if the keyboard doesn't have a working ALT).
175 #\bind "F9"                     "------"
176 #\bind "F10"                    "------"
177
178
179 # Sciword mnemonics for math editing:
180
181 \bind "M-apostrophe"    "math-insert \prime"
182 \bind "C-Up"            "math-superscript"
183 \bind "C-Down"          "math-subscript"
184 \bind "C-s d"           "math-insert \partial"
185 \bind "C-s e"           "math-insert \sum"
186 \bind "C-s p"           "math-insert \prod"
187 \bind "C-s i"           "math-insert \infty"
188 \bind "C-s x"           "math-insert \times"
189 \bind "C-s m"           "math-matrix 3 3"
190 \bind "C-s v"           "math-matrix 1 2"
191
192 # My own embellishments for symbols I use often.
193
194 #I'd like to combine math-insert ^ and math-insert prime, but don't know how.
195
196 \bind "C-s apostrophe"  "command-sequence math-superscript; math-insert \prime;"
197 \bind "C-s S-plus"      "math-insert \dagger"
198 \bind "C-s equal"       "math-insert \equiv"
199 \bind "M-equal"         "math-insert \approx"
200 \bind "M-minus"         "math-insert \sim"
201 \bind "C-minus"         "math-insert \rightarrow"
202 # here is how to make a vector accent:
203 \bind "C-equals"    "math-insert \overrightarrow"
204 \bind "S-M-less"        "math-insert \leq"
205 \bind "S-M-greater"     "math-insert \geq"
206 \bind "C-s S-less"      "math-insert \ll"
207 \bind "C-s S-greater"   "math-insert \gg"
208
209 # usual bindings
210 \bind_file maths.bind
211 \bind_file menus.bind
212 \bind_file latinkeys.bind
213 \bind_file cyrkeys.bind
214 \bind_file greekkeys.bind
215
216
217 \bind "S-KP_Right"                      "forward-select"
218 \bind "S-KP_Left"                               "backward-select"
219 \bind "S-KP_Up"                                 "up-select"
220 \bind "S-KP_Down"                               "down-select"
221 \bind "S-C-KP_Right"                    "word-forward-select"
222 \bind "S-C-KP_Left"                     "word-backward-select"
223 \bind "S-C-KP_Up"                               "paragraph-up-select"
224 \bind "S-C-KP_Down"                     "paragraph-down-select"
225 \bind "S-KP_Home"                               "line-begin-select"
226 \bind "S-KP_End"                                "line-end-select"
227 \bind "S-KP_Prior"                      "screen-up-select"
228 \bind "S-KP_Next"                               "screen-down-select"
229 \bind "S-C-KP_Home"                     "buffer-begin-select"
230 \bind "S-C-KP_End"                      "buffer-end-select"
231 \bind "S-C-KP_Prior"                    "buffer-begin-select"
232 \bind "S-C-KP_Next"                     "buffer-end-select"
233 \bind "C-KP_Insert"                     "copy"
234 \bind "S-KP_Insert"                     "paste"
235 \bind "S-KP_Delete"                     "cut"
236
237
238 \bind "M-x" "command-execute"