]> git.lyx.org Git - lyx.git/blobdiff - lib/bind/sciword.bind
A slightly buggy lfun all-insets-toggle.
[lyx.git] / lib / bind / sciword.bind
index 5e14e7f7a0256abcc23042e4ba78123e3e6c3597..5b0737668c083345015b4fea5fcfd72f68d9817c 100644 (file)
@@ -1,13 +1,14 @@
-# This file is part of LyX
+# -*- text -*-
 
-# LyX keyboard definitions similar to those of Scientific Word.
-# Prepared by Serge Winitzki. Version 1.2
-# Somewhat updated by Jean-Marc Lasgouttes (I'm sure that I simplified it, 
-#    but I'm not sure that I did not break it :)
+# file sciword.bind
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+
+# author Serge Winitzki
 
-# Tip: to find the "LyX name" for a key, look at the status bar after
-# typing some non-existent key combination. E.g. to find how "Ctrl-&" is
-# referenced, press Ctrl-S Ctrl-&: the status bar shows "C-s S-C-ampersand."
+# Full author contact details are available in file CREDITS.
+
+# LyX keyboard definitions similar to those of Scientific Word.
 
 #\bind "C-a"                    "------"
 #\bind "C-b"                    "font-bold"
 \bind "C-d"    "math-display"
 
 #\bind "C-e"   "------"
-# Greek for only one character. "math-greek-toggle" is the persistent Greek
-# toggle which nobody really needs when typing math.
 # Sciword mnemonic.
 \bind "C-f"    "math-insert \frac"
-\bind "C-g"    "math-greek"
+
+# Since the toggles don't work in 1.2.0, let's define all letters.
+# lowercase math Greek
+\bind "C-g a" "math-insert \alpha"
+\bind "C-g b" "math-insert \beta"
+\bind "C-g g" "math-insert \gamma"
+\bind "C-g d" "math-insert \delta"
+\bind "C-g e" "math-insert \varepsilon"
+\bind "C-g C-e" "math-insert \epsilon"
+\bind "C-g z" "math-insert \zeta"
+\bind "C-g h" "math-insert \eta"
+\bind "C-g q" "math-insert \theta"
+\bind "C-g C-q" "math-insert \vartheta"
+\bind "C-g i" "math-insert \iota"
+\bind "C-g k" "math-insert \kappa"
+\bind "C-g l" "math-insert \lambda"
+\bind "C-g m" "math-insert \mu"
+\bind "C-g n" "math-insert \nu"
+\bind "C-g x" "math-insert \xi"
+\bind "C-g p" "math-insert \pi"
+\bind "C-g C-p" "math-insert \varpi"
+\bind "C-g r" "math-insert \rho"
+\bind "C-g s" "math-insert \sigma"
+\bind "C-g C-s" "math-insert \varsigma"
+\bind "C-g t" "math-insert \tau"
+\bind "C-g v" "math-insert \upsilon"
+\bind "C-g f" "math-insert \phi"
+\bind "C-g c" "math-insert \chi"
+\bind "C-g y" "math-insert \psi"
+\bind "C-g w" "math-insert \omega"
+
+# uppercase math Greek
+\bind "C-g S-G" "math-insert \Gamma"
+\bind "C-g S-D" "math-insert \Delta"
+\bind "C-g S-Q" "math-insert \Theta"
+\bind "C-g S-L" "math-insert \Lambda"
+\bind "C-g S-X" "math-insert \Xi"
+\bind "C-g S-P" "math-insert \Pi"
+\bind "C-g S-S" "math-insert \Sigma"
+\bind "C-g S-V" "math-insert \Upsilon"
+\bind "C-g S-F" "math-insert \Phi"
+\bind "C-g S-Y" "math-insert \Psi"
+\bind "C-g S-W" "math-insert \Omega"
+
 
 # Do we need this?
 #\bind "C-h"   "hyphenation-point-insert"
@@ -43,8 +85,9 @@
 # C-n is numbering equations now. Sciword had "C-Tab" mnemonic which conflicts with many things.
 # 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!
 \bind "C-n"    "math-number"
-\bind "S-C-n" "math-nonumber"
-\bind "C-o"    "inset-toggle"
+\bind "S-C-N" "math-nonumber"
+
+\bind "C-o"    "file-open"
 
 # Insert a quote character. Do I need this?
 # Probably, since we need a way to get a raw quote
 
 # Sciword mnemonic.
 \bind "C-r"    "math-insert \sqrt"
+\bind "S-C-R"  "math-insert \root"
 
 # This combination is now a gateway to math symbols (C-s ...)
 #\bind "C-s"   "------"
 
 # Sciword mnemonic for going between text and math modes.
 \bind "C-t"    "math-mode"
+
 \bind "C-u"    "font-underline"
 \bind "C-v"    "paste"
 \bind "C-w"    "buffer-close"
 \bind "C-x"    "cut"
 \bind "C-z"    "undo"
-\bind "S-C-z"  "redo"
+\bind "S-C-Z"  "redo"
 
 
 # This combination makes an umlaut accent now.
 #\bind "S-C-quotedbl"           "quote-insert"
+\bind "S-M-quotedbl"           "quote-insert single"
 
 # Bracket delimiters. Sciword mnemonic is to press Control-<bracket key>
 
 
 # Accents by Sciword mnemonics. Mostly press Ctrl-<accent key>
 # e.g. Ctrl-. for overdot, Ctrl-' for acute accent, Ctrl-~ for tilde etc.
-# Some of them seem to work only in math mode?
+# Some of them work only in math mode
 
 \bind "C-period"       "accent-dot"
+\bind "C-comma"        "math-insert \dot"
 \bind "S-C-colon"      "math-insert \ddot"
 \bind "C-quoteleft"    "accent-grave"
 \bind "S-C-asciitilde" "accent-tilde"
 \bind "S-C-quotedbl"   "accent-umlaut"
 \bind "C-apostrophe"   "accent-acute"
 \bind "S-C-asciicircum" "accent-circumflex"
-\bind "C-equal"                "math-insert \vec"
+# accent-vector has been changed?
+#\bind "C-equal"               "accent-vector"
 # Why is it not "accent-bar"?
 \bind "C-minus"        "math-insert \bar"
 # What is "accent-underbar"?
 #\bind "F1"    "help"  # Not yet implemented!
 #\bind "C-F1"                   "help-context"                  # Not yet implemented!
 \bind "F2"                     "buffer-write"
+\bind "S-F2"                     "buffer-export latex"
 \bind "F3"                     "find-replace"
 
 \bind "C-F4"                   "buffer-close"
 #\bind "F9"                     "------"
 #\bind "F10"                    "------"
 
+
 # Sciword mnemonics for math editing:
 
 \bind "M-apostrophe"   "math-insert \prime"
-\bind "C-Up"           "math-insert ^"
-\bind "C-Down"         "math-insert _"
+\bind "C-Up"           "math-superscript"
+\bind "C-Down"         "math-subscript"
 \bind "C-s d"          "math-insert \partial"
 \bind "C-s e"          "math-insert \sum"
 \bind "C-s p"          "math-insert \prod"
 \bind "C-s i"          "math-insert \infty"
 \bind "C-s x"          "math-insert \times"
+\bind "C-s m"          "math-matrix 3 3"
+\bind "C-s v"          "math-matrix 1 2"
 
 # My own embellishments for symbols I use often.
 
 #I'd like to combine math-insert ^ and math-insert prime, but don't know how.
 
-\bind "C-s apostrophe" "math-insert \prime"
+\bind "C-s apostrophe" "command-sequence math-superscript; math-insert \prime;"
 \bind "C-s S-plus"     "math-insert \dagger"
 \bind "C-s equal"      "math-insert \equiv"
 \bind "M-equal"                "math-insert \approx"
 \bind "M-minus"                "math-insert \sim"
 \bind "C-minus"                "math-insert \rightarrow"
+# here is how to make a vector accent:
+\bind "C-equals"    "math-insert \overrightarrow"
 \bind "S-M-less"       "math-insert \leq"
 \bind "S-M-greater"    "math-insert \geq"
 \bind "C-s S-less"     "math-insert \ll"
 \bind "C-s S-greater"  "math-insert \gg"
 
-# usual math bindings
+# usual bindings
 \bind_file maths.bind
-
-       ############################
-######### Almost no changes below. #########
-       ############################
-
-#
-# Motion group
-#
-
-\bind "Right"                  "char-forward"
-\bind "Left"                   "char-backward"
-\bind "Up"                     "up"
-\bind "Down"                   "down"
-\bind "C-Right"                "word-forward"
-\bind "C-Left"                 "word-backward"
-# These are now used to insert superscripts and subscripts.
-#\bind "C-Up"                   "paragraph-up"
-#\bind "C-Down"                 "paragraph-down"
-\bind "Home"                   "line-begin"
-\bind "End"                    "line-end"
-\bind "Prior"                  "screen-up"
-\bind "Next"                   "screen-down"
-\bind "C-Home"                 "buffer-begin"
-\bind "C-End"                  "buffer-end"
-\bind "Tab"                    "tab-forward"
-
-#
-# Motion + select group
-#
-
-\bind "S-Right"                "forward-select"
-\bind "S-Left"                 "backward-select"
-\bind "S-Up"                   "up-select"
-\bind "S-Down"                 "down-select"
-\bind "S-C-Right"              "word-forward-select"
-\bind "S-C-Left"               "word-backward-select"
-\bind "S-C-Up"                 "paragraph-up-select"
-\bind "S-C-Down"               "paragraph-down-select"
-\bind "S-Home"                 "line-begin-select"
-\bind "S-End"                  "line-end-select"
-\bind "S-Prior"                "screen-up-select"
-\bind "S-Next"                 "screen-down-select"
-\bind "S-C-Home"               "buffer-begin-select"
-\bind "S-C-End"                "buffer-end-select"
-\bind "C-Insert"               "copy"
-\bind "S-Insert"               "paste"
-\bind "S-Delete"               "cut"
-
-# Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
-\bind "S-KP_Right"              "forward-select"
-\bind "S-KP_Left"               "backward-select"
-\bind "S-KP_Up"                 "up-select"
-\bind "S-KP_Down"               "down-select"
-\bind "S-C-KP_Right"            "word-forward-select"
-\bind "S-C-KP_Left"             "word-backward-select"
-\bind "S-C-KP_Up"               "paragraph-up-select"
-\bind "S-C-KP_Down"             "paragraph-down-select"
-\bind "S-KP_Home"               "line-begin-select"
-\bind "S-KP_End"                "line-end-select"               
-\bind "S-KP_Prior"              "screen-up-select"
-\bind "S-KP_Next"               "screen-down-select"
-\bind "S-C-KP_Home"             "buffer-begin-select"
-\bind "S-C-KP_End"              "buffer-end-select"
-\bind "S-C-KP_Prior"            "buffer-begin-select"
-\bind "S-C-KP_Next"             "buffer-end-select"
-\bind "C-KP_Insert"             "copy"
-\bind "S-KP_Insert"             "paste"
-\bind "S-KP_Delete"             "cut"
-
-
-#
-# Edit group
-#
-
-\bind "Delete"                 "delete-forward"
-\bind "BackSpace"              "delete-backward"
-\bind "C-Delete"               "word-delete-forward"
-\bind "C-BackSpace"            "word-delete-backward"
-\bind "Return"                 "break-paragraph"
-\bind "M-Return"               "break-paragraph-keep-layout"
-\bind "C-Return"               "break-line"
-\bind "C-S-L"                  "ligature-break-insert"
-\bind "C-space"                "protected-space-insert"
-\bind "Escape"                 "cancel"
-\bind "F9"                     "meta-prefix"
-
-
-#
-# The menus
-#
-
 \bind_file menus.bind
-
-# this clashes with M-x so we can't use it. M-x is more
-# important (reported by Serge Winitzki <winitzki@yahoo.com>)
-# \bind "M-x c"                  "screen-recenter"
-
-\bind "M-x"                    "command-execute"
-
-
 \bind_file latinkeys.bind
 \bind_file cyrkeys.bind
 \bind_file greekkeys.bind
+
+
+\bind "S-KP_Right"                     "forward-select"
+\bind "S-KP_Left"                              "backward-select"
+\bind "S-KP_Up"                                "up-select"
+\bind "S-KP_Down"                              "down-select"
+\bind "S-C-KP_Right"                   "word-forward-select"
+\bind "S-C-KP_Left"                    "word-backward-select"
+\bind "S-C-KP_Up"                              "paragraph-up-select"
+\bind "S-C-KP_Down"                    "paragraph-down-select"
+\bind "S-KP_Home"                              "line-begin-select"
+\bind "S-KP_End"                               "line-end-select"
+\bind "S-KP_Prior"                     "screen-up-select"
+\bind "S-KP_Next"                              "screen-down-select"
+\bind "S-C-KP_Home"                    "buffer-begin-select"
+\bind "S-C-KP_End"                     "buffer-end-select"
+\bind "S-C-KP_Prior"                   "buffer-begin-select"
+\bind "S-C-KP_Next"                    "buffer-end-select"
+\bind "C-KP_Insert"                    "copy"
+\bind "S-KP_Insert"                    "paste"
+\bind "S-KP_Delete"                    "cut"
+
+
+\bind "M-x" "command-execute"