X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fbind%2Fsciword.bind;h=55a146bc9b43410a0d45d47674a4a9f3cb802fdd;hb=f34db97500d279bba22e35c22edc7f4e9fed3e3f;hp=844737929fc5f5d5e19c0822935376eb546f37fd;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=lyx.git diff --git a/lib/bind/sciword.bind b/lib/bind/sciword.bind index 844737929f..55a146bc9b 100644 --- a/lib/bind/sciword.bind +++ b/lib/bind/sciword.bind @@ -1,16 +1,20 @@ -# This file is part of LyX +# -*- text -*- -# LyX keyboard definitions similar to those of Scientific Word. -# Prepared by Serge Winitzki. Version 1.0 +# 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 how LyX calls a pressed key, look at the status bar after -# entering a non-existent key combination. E.g. want to find how "Ctrl-&" is -# referenced, so 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" # Copy, paste, etc.: more familiar keys +Format 5 + \bind "C-c" "copy" # Display equation toggle: type it in a displayed equation to convert it @@ -19,98 +23,159 @@ \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" - -# Do I need this? -#\bind "C-h" "hyphenation-point-insert" +\bind "C-f" "math-insert \frac" + +# 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 y" "math-insert \theta" +\bind "C-g S-z" "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 u" "math-insert \upsilon" +\bind "C-g f" "math-insert \phi" +\bind "C-g q" "math-insert \chi" +\bind "C-g c" "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-Y" "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-U" "math-insert \Upsilon" +\bind "C-g S-F" "math-insert \Phi" +\bind "C-g S-C" "math-insert \Psi" +\bind "C-g S-W" "math-insert \Omega" + + +# Do we need this? +#\bind "C-h" "specialchar-insert hyphenation" # Sciword mnemonic. -\bind "C-i" "math-insert int" +\bind "C-i" "math-insert \int" #\bind "C-j" "------" \bind "C-k" "line-delete-forward" -\bind "C-l" "screen-recenter" +\bind "C-j" "screen-recenter" +\bind "C-S-I" "info-insert" # Toggle: in text mode, switch to math, and vice versa. Also C-t. \bind "C-m" "math-mode" -#\bind "C-n" "------" -\bind "C-o" "open-stuff" -\bind "C-p" "font-code" +\bind "Insert" "math-mode" +\bind "C-n" "math-number-toggle" +\bind "S-C-N" "math-number-line-toggle" + +\bind "C-o" "file-open" + # Insert a quote character. Do I need this? -\bind "C-q" "quote-insert" +# Probably, since we need a way to get a raw quote +\bind "C-q" "self-insert \"" # Sciword mnemonic. -\bind "C-r" "math-insert sqrt" +\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" "font-smallcaps" +#\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-S-v" "clipboard-paste" +\bind "C-M-v" "primary-selection-paste" \bind "C-w" "buffer-close" +\bind "C-n" "buffer-new" \bind "C-x" "cut" \bind "C-z" "undo" -\bind "S-C-z" "redo" +\bind "S-C-Z" "redo" +\bind "C-a" "inset-select-all" +\bind "C-M-a" "command-sequence buffer-begin ; buffer-end-select" # select all -# This combination makes an umlaut accept now. +# This combination makes an umlaut accent now. #\bind "S-C-quotedbl" "quote-insert" +\bind "S-M-quotedbl" "quote-insert inner" # Bracket delimiters. Sciword mnemonic is to press Control- +# On U.S. keyboard with Windows Ctrl+Shift definition must refer to +# unshifted character -- Fixed by Michael \bind "C-9" "math-delim ( )" \bind "S-C-parenleft" "math-delim ( )" +\bind "S-C-9" "math-delim ( )" \bind "C-0" "math-delim ( )" \bind "S-C-parenright" "math-delim ( )" +\bind "S-C-0" "math-delim ( )" -\bind "C-S-bracketleft" "math-delim [ ]" -\bind "C-S-bracketright" "math-delim [ ]" +\bind "C-bracketleft" "math-delim [ ]" +\bind "C-bracketright" "math-delim [ ]" \bind "C-S-less" "math-delim langle rangle" \bind "C-S-greater" "math-delim langle rangle" # The bar bracket: on some keyboards, e.g. British, the bar character is -# misplaced to an Alt-something +# bound to an Alt-something and on some wayward Unices to "brokenbar". \bind "C-S-bar" "math-delim | |" \bind "C-S-brokenbar" "math-delim | |" \bind "C-M-bar" "math-delim | |" +# On U.S. keyboard with Windows Ctrl+Shift definition must refer to +# unshifted character -- Fixed by Michael \bind "S-C-braceleft" "math-delim { }" \bind "S-C-braceright" "math-delim { }" +\bind "S-C-bracketleft" "math-delim { }" +\bind "S-C-bracketright" "math-delim { }" -# Accents. Sciword mnemonic. Mostly need to press Ctrl- -# e.g. Ctrl-. for overdot, Ctrl-' for acute accent, Ctrl-~ for tilda etc. -# Some of them seem to work only in math mode? +# Accents by Sciword mnemonics. Mostly press Ctrl- +# e.g. Ctrl-. for overdot, Ctrl-' for acute accent, Ctrl-~ for tilde etc. +# Some of them work only in math mode -# S-C-period? \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" "accent-vector" +# accent-vector has been changed? +#\bind "C-equal" "accent-vector" # Why is it not "accent-bar"? -\bind "C-minus" "math-insert bar" +\bind "C-minus" "math-insert \bar" # What is "accent-underbar"? #\bind "S-C-underscore" "accent-underbar" -# Numbering equations. Should perhaps simplify math-number and math-nonumber into one command. This and also math-macro stuff should be available in the menus! -# Sciword mnemonic, kind of (was just "TAB"). - -\bind "C-Tab" "math-number" -\bind "C-S-Tab" "math-nonumber" - # Function keys. #\bind "F1" "help" # Not yet implemented! #\bind "C-F1" "help-context" # Not yet implemented! \bind "F2" "buffer-write" -\bind "F3" "find-replace" +\bind "S-F2" "buffer-export latex" +\bind "F3" "dialog-show findreplace" \bind "C-F4" "buffer-close" \bind "M-F4" "lyx-quit" @@ -118,362 +183,87 @@ \bind "F4" "font-default" \bind "F5" "font-bold" \bind "F6" "font-emph" -\bind "F7" "font-code" +\bind "F7" "font-typewriter" \bind "F8" "font-noun" -# F9 bound below as meta-prefix (e.g. if the keyboard doesn't have ALT). +# F9 bound below as meta-prefix (useful e.g. if the keyboard doesn't have a working ALT). #\bind "F9" "------" #\bind "F10" "------" -# -# Math menu (unmodified) -# - -\bind "M-m f" "math-insert frac" -\bind "M-m i" "math-insert int" -\bind "M-m o" "math-insert oint" -\bind "M-m p" "math-insert partial" -\bind "M-m s" "math-insert sqrt" -\bind "M-m S-S" "math-insert sum" -\bind "M-m l" "math-limits" -\bind "M-m n" "math-number" -\bind "M-m v" "accent-vector" -\bind "M-m space" "menu-open Math" # Sciword mnemonics for math editing: -\bind "M-apostrophe" "math-insert prime" -\bind "C-Up" "math-insert ^" -\bind "C-Down" "math-insert _" -\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 "M-apostrophe" "math-insert \prime" +\bind "C-Up" "math-superscript" +\bind "C-h" "math-superscript" +\bind "C-3" "math-superscript" +\bind "C-Down" "math-subscript" +\bind "C-l" "math-subscript" +\bind "C-4" "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 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 "M-less" "math-insert leq" -\bind "M-greater" "math-insert geq" -\bind "C-s S-less" "math-insert ll" -\bind "C-s S-greater" "math-insert gg" - - ############################ -######### 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" - -# -# 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-space" "protected-space-insert" -\bind "Escape" "cancel" -\bind "F9" "meta-prefix" - -# -# Visible Menu access menu -# - -\bind "F10 d" "menu-open Documents" -\bind "F10 e" "menu-open Edit" -\bind "F10 f" "menu-open File" -\bind "F10 h" "menu-open Help" -\bind "F10 i" "menu-open Insert" -\bind "F10 l" "menu-open Layout" -\bind "F10 m" "menu-open Math" -\bind "F10 o" "menu-open Options" - - - -# -# File menu -# - -\bind "M-f a" "buffer-write-as" -\bind "M-f c" "buffer-close" -\bind "M-f n" "buffer-new" -#\bind "M-f l" "file-last" # Not yet implemented. -\bind "M-f o" "buffer-open" -\bind "M-f p" "buffer-print" -\bind "M-f q" "lyx-quit" -\bind "M-f r" "buffer-typeset" - # Obsolete -\bind "M-f s" "buffer-write" -\bind "M-f t" "buffer-typeset" - -\bind "M-f x" "buffer-view" -\bind "M-f g" "buffer-view-ps" -\bind "M-f space" "menu-open File" - - -# -# Edit menu -# - -#\bind "M-e b" "table" # Not yet implemented! -\bind "M-e c" "cut" -\bind "M-e e" "error-next" -\bind "M-e f" "find-replace" -\bind "M-e k" "line-delete-forward" -\bind "M-e m" "mark-on" -\bind "M-e S-M" "mark-off" -\bind "M-e n" "note-next" -\bind "M-e o" "copy" -\bind "M-e p" "paste" -\bind "M-e r" "redo" -\bind "M-e s" "spellchecker" -#\bind "M-e t" "toc-update" -\bind "M-e u" "undo" -\bind "M-e space" "menu-open Edit" - - -# -# Layout menu -# - -\bind "M-l c" "layout-character" -\bind "M-l p" "layout-paragraph" -\bind "M-l d" "layout-document" -\bind "M-l q" "layout-quotes" -\bind "M-l l" "layout-preamble" -\bind "M-l e" "font-emph" -#\bind "M-l n" "font-smallcaps" -\bind "M-l b" "font-bold" -\bind "M-l t" "tex-mode" -\bind "M-l v" "depth-next" -\bind "M-l space" "menu-open Layout" - - - -# -# Insert menu -# - -\bind "M-i f" "footnote-insert" -\bind "M-i h" "hfill-insert" -\bind "M-i m" "marginpar-insert" -\bind "M-i n" "note-insert" -\bind "M-i l" "label-insert" -\bind "M-i r" "reference-insert" -\bind "M-i minus" "hyphenation-point-insert" -\bind "M-i apostrophe" "quote-insert" -\bind "M-i S-quotedbl" "quote-insert" -\bind "M-i space" "menu-open Insert" - - - -# -# Options menu -# - -#\bind "M-o f" "screen-font-options" # Not yet implemented! -#\bind "M-o s" "spellcheck-options" # Not yet implemented! -#\bind "M-o k" "keyboard-options" # Not yet implemented! -#\bind "M-o l" "latex-options" # Not yet implemented! -\bind "M-o space" "menu-open Options" - - - -# -# Documents menu -# - -\bind "M-d p" "buffer-previous" -\bind "M-d space" "menu-open Documents" - - - -# -# Help menu -# - -#\bind "M-h d" "help-documentation" # Not yet implemented! -#\bind "M-h o" "help-copyright" # Not yet implemented! -#\bind "M-h w" "help-warranty" # Not yet implemented! -#\bind "M-h c" "help-credits" # Not yet implemented! -#\bind "M-h v" "help-version" # Not yet implemented! -\bind "M-h space" "menu-open Help" - - - -# -# Font size menu -# - -\bind "M-s S-A" "font-size largest" # \LARGE -\bind "M-s g" "font-size giant" # \Huge -\bind "M-s h" "font-size huge" # \huge -\bind "M-s S-H" "font-size giant" # \Huge -\bind "M-s l" "font-size large" # \large -\bind "M-s S-L" "font-size larger" # \Large -\bind "M-s n" "font-size normal" # \normalsize -\bind "M-s s" "font-size small" # \small -\bind "M-s t" "font-size tiny" # \tiny - -\bind "M-s 1" "font-size tiny" -\bind "M-s 2" "font-size small" -\bind "M-s 3" "font-size normal" -\bind "M-s 4" "font-size large" -\bind "M-s 5" "font-size larger" -\bind "M-s 6" "font-size largest" -\bind "M-s 7" "font-size huge" -\bind "M-s 8" "font-size giant" - - - -# -# Alignment menu -# - -#\bind "M-a l" "para-align left" # Not yet implemented! -#\bind "M-a r" "para-align right" # Not yet implemented! -#\bind "M-a c" "para-align center" # Not yet implemented! -#\bind "M-a b" "para-align block" # Not yet implemented! -#\bind "M-a f" "para-align block" # Not yet implemented! -#\bind "M-a d" "para-align default" # Not yet implemented! - - - -# -# Paragraph style menu -# - -\bind "M-p c" "drop-layouts-choice" -\bind "M-p 1" "layout Chapter" -\bind "M-p 2" "layout Section" -\bind "M-p 3" "layout Subsection" -\bind "M-p 4" "layout Subsubsection" -\bind "M-p 5" "layout Paragraph" -\bind "M-p 6" "layout Subparagraph" -\bind "M-p b" "layout Itemize" # bulleted list -\bind "M-p d" "layout Description" -\bind "M-p e" "layout Enumerate" # numbered list -\bind "M-p i" "layout Itemize" # bulleted list -\bind "M-p l" "layout List" -\bind "M-p n" "layout Enumerate" # numbered list -\bind "M-p p" "layout Lyx-Code" -\bind "M-p q" "layout Quote" -\bind "M-p S-Q" "layout Quotation" -\bind "M-p s" "layout Standard" -\bind "M-p t" "layout Title" -\bind "M-p S-at" "layout Section*" # M-p S-2 -\bind "M-p S-dollar" "layout Subsubsection*" # M-p S-4 -\bind "M-p S-numbersign" "layout Subsection*" # M-p S-3 - -\bind "M-p Left" "depth-decrement" -\bind "M-p Right" "depth-increment" - - - -# -# Character style menu -# - -\bind "M-c b" "font-bold" -#\bind "M-c c" "font-smallcaps" -\bind "M-c e" "font-emph" -\bind "M-c i" "font-emph" # italics -\bind "M-c m" "math-mode" -\bind "M-c p" "font-code" -\bind "M-c r" "font-roman" -\bind "M-c s" "font-sans" -\bind "M-c t" "tex-mode" -\bind "M-c u" "font-underline" - -\bind "M-c Down" "word-lowcase" -\bind "M-c Up" "word-upcase" -\bind "M-c Right" "word-capitalize" - -\bind "M-c space" "font-default" - - - -# -# Keyboard menu -# - -\bind "M-k 1" "keymap-primary" -\bind "M-k 2" "keymap-secondary" -\bind "M-k o" "keymap-off" -\bind "M-k t" "keymap-toggle" -\bind "M-k x" "keymap-off" - - - -# -# Misc menu -# - -\bind "M-x c" "screen-recenter" - - - - - - - - - - - - - - - - - +\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 bindings +\bind_file math.bind +\bind_file menus.bind +\bind_file latinkeys.bind +\bind_file cyrkeys.bind +\bind_file greekkeys.bind + + +\bind "M-Up" "command-alternatives outline-up; paragraph-move-up; tabular-feature move-row-up" +\bind "M-Down" "command-alternatives outline-down; paragraph-move-down; tabular-feature move-row-down" +\bind "M-Right" "tabular-feature move-column-right" +\bind "M-Left" "tabular-feature move-column-left" +\bind "S-KP_Right" "char-right-select" +\bind "S-KP_Left" "char-left-select" +\bind "S-KP_Up" "up-select" +\bind "S-KP_Down" "down-select" +\bind "S-C-KP_Right" "word-right-select" +\bind "S-C-KP_Left" "word-left-select" +\bind "C-KP_Right" "word-right" +\bind "C-KP_Left" "word-left" +\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" + +\bind "C-M-c" "buffer-view" + +# custom commands imported from cua.bind by Michael +\bind "C-space" "command-alternatives math-space ; space-insert protected" +\bind "C-Return" "newline-insert newline" +\bind "C-S-Return" "newline-insert linebreak"