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