]> git.lyx.org Git - lyx.git/blob - lib/bind/xemacs.bind
Fix key bindings for math space (#8974)
[lyx.git] / lib / bind / xemacs.bind
1 # -*- text -*-
2
3 # file xemacs.bind
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6
7 # author Lars Gullik Bjønnes
8 # author Jean-Marc Lasgouttes
9 # author Angus Leeming
10 # author John Levon
11 # author Allan Rae
12 # author Dekel Tsur
13 # author Jürgen Vigna
14 # author Andrew Zabolotny
15
16 # Full author contact details are available in file CREDITS.
17
18 # This is the XEMACS flavour bind file, based on the bindings found
19 # in the XEmacs editor. It has many bindings identical to the
20 # Emacs binding file although there are a few significant changes.
21 #
22 #
23 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
24 # with every new install of LyX and your changes will be lost.
25 # Instead, customize a copy of this file placed in
26 # ~/.lyx/bind/xemacs.bind
27 #
28 # Happy tuning!
29
30 Format 1
31
32 \bind "C-~S-at"                 "mark-on"
33 \bind "C-a"                     "line-begin"
34 \bind "C-b"                     "char-backward"
35 #bind "C-c"                     "------" # see end of file
36 \bind "C-d"                     "char-delete-forward"
37 \bind "C-e"                     "line-end"
38 \bind "C-f"                     "char-forward"
39 \bind "C-g"                     "cancel"
40
41 # help in emacs
42 \bind "C-h"                    "specialchar-insert hyphenation"
43 \bind "C-M-minus"               "specialchar-insert nobreakdash"
44 \bind "C-i"                    "space-insert hfill"
45 #bind "C-j"                    "------"
46 \bind "C-k"                    "line-delete-forward"
47 \bind "C-l"                    "screen-recenter"
48 \bind "C-m"                    "mark-toggle"
49 \bind "C-n"                    "down"
50 \bind "C-o"                    "inset-toggle"
51 \bind "C-p"                    "up"
52
53 # this is "quoted-insert" a total different meaning from "quote-insert"
54 \bind "C-q"                    "self-insert \""
55 #bind "C-r"                    "------"
56 \bind "C-s"                    "dialog-show findreplace"
57 \bind "C-S-s"                  "dialog-show findreplaceadv"
58 \bind "M-~S-percent"           "dialog-show findreplaceadv"
59
60 # should be "chars-transpose" (swaps two chars)
61 #bind "C-t"                    "------"
62
63 # universal argument in emacs
64 \bind "C-u"                    "font-underline"
65
66 # better name would be "scroll-up" as in emacs
67 \bind "C-v"                    "screen-down"
68 \bind "M-v"                    "screen-up"
69
70 \bind "C-w"                    "cut"
71 #bind "C-x"                    "------"
72 \bind "C-y"                    "paste"
73
74 #should be "lyx-iconify"
75 #bind "C-z"                    "------"   # see end of file
76
77 \bind "C-~S-slash"             "undo"
78 \bind "C-~S-underscore"        "undo"
79
80 \bind "~S-M-quotedbl"           "quote-insert single"
81 \bind "~S-C-quotedbl"           "self-insert \""
82
83 \bind "C-x a"                  "buffer-auto-save"
84 # not currently supported
85 #\bind "C-x b"                 "buffer-previous"
86 \bind "C-x d"                  "buffer-new"
87 \bind "C-x g"                  "buffer-view ps"
88 \bind "C-x k"                  "buffer-close"
89 \bind "C-x p"                  "buffer-view dvi"
90 \bind "C-x r"                  "buffer-update dvi"
91 # Should have been "buffer-write-some"
92 # \bind "C-x s"                  "buffer-write"
93 \bind "C-x t"                  "buffer-update dvi"
94 \bind "C-x u"                  "undo"
95 \bind "C-x v h"                "dialog-show vclog"
96 \bind "C-x v v"                "vc-check-in"
97 \bind "C-x v u"                "vc-revert"
98 \bind "C-x v c"                "vc-undo-last"
99 \bind "C-x v i"                "vc-register"
100 #\bind "C-x w"                  "buffer-write-as"
101 \bind "C-x bracketleft"        "screen-up"
102 \bind "C-x bracketright"       "screen-down"
103 \bind "C-x C-a"                "buffer-auto-save"
104 \bind "C-x C-b"                "menu-open view" # list all buffers
105 \bind "C-x C-c"                "lyx-quit"
106 \bind "C-x C-d"                "buffer-new"
107 \bind "C-x C-f"                "file-open"
108 \bind "C-x C-g"                "buffer-view ps"
109 \bind "C-x C-l"                 "word-lowcase"          # downcase-region!
110 \bind "C-x C-p"                "buffer-view dvi"
111 \bind "C-x C-q"                "buffer-toggle-read-only"
112 #\bind "C-x C-r"                "buffer-update dvi"
113 \bind "C-x C-s"                "buffer-write"
114 \bind "C-x C-t"                "buffer-update dvi"
115 \bind "C-x C-u"                 "word-upcase"           # upcase-region!
116 \bind "C-x C-w"                "buffer-write-as"
117 \bind "C-Next"                 "buffer-next"
118 \bind "C-Prior"                "buffer-previous"
119
120 #bind "C-1"                    "------"
121 #bind "C-2"                    "------"
122 #bind "C-3"                    "------"
123 #bind "C-4"                    "------"
124 #bind "C-5"                    "------"
125 #bind "C-6"                    "------"
126 #bind "C-7"                    "------"
127 #bind "C-8"                    "------"
128 #bind "C-9"                    "------"
129 #bind "C-0"                    "------"
130
131 #bind "F1"                     "help"                          # Not yet implemented!
132 #bind "C-F1"                   "help-context"                  # Not yet implemented!
133 #\bind "F2"                     "buffer-write"
134 #\bind "F3"                     "file-open"
135 #bind "F4"                     "------"
136 #bind "F5"                     "------"
137 #bind "F6"                     "------"
138 #bind "F7"                     "------"
139 #bind "F8"                     "------"
140 #bind "F9"                     "------"
141 #bind "F10"                    "------"
142
143 \bind "M-x"                     "command-execute"
144
145
146 #
147 # Motion group
148 #
149
150 \bind "M-Up"                   "command-alternatives outline-up; paragraph-move-up; inset-modify tabular move-row-up"
151 \bind "M-Down"                 "command-alternatives outline-down; paragraph-move-down; inset-modify tabular move-row-down"
152 \bind "M-Right"                "inset-modify tabular move-column-right"
153 \bind "M-Left"                 "inset-modify tabular move-column-left"
154 \bind "C-Right"                "word-right"
155 \bind "C-Left"                 "word-left"
156 \bind "C-Up"                   "paragraph-up"
157 \bind "C-Down"                 "paragraph-down"
158 \bind "M-bracketleft"          "paragraph-up"
159 \bind "M-bracketright"         "paragraph-down"
160 \bind "Home"                   "line-begin"
161 \bind "End"                    "line-end"
162 \bind "C-Home"                 "buffer-begin"
163 \bind "C-End"                  "buffer-end"
164 \bind "M-~S-less"              "buffer-begin"
165 \bind "M-~S-greater"           "buffer-end"
166
167 \bind "Prior"                  "screen-up"
168 \bind "Next"                   "screen-down"
169
170 # A bit like autoindent in c-mode
171 \bind "Tab"                     "depth-increment"
172
173 \bind "C-~S-greater"            "label-goto"
174 \bind "C-~S-less"               "bookmark-goto 0"
175 \bind "C-~S-1"                  "bookmark-goto 1"
176 \bind "C-~S-2"                  "bookmark-goto 2"
177 \bind "C-~S-3"                  "bookmark-goto 3"
178 \bind "C-~S-4"                  "bookmark-goto 4"
179 \bind "C-~S-5"                  "bookmark-goto 5"
180 \bind "C-~S-6"                  "bookmark-goto 6"
181 \bind "C-~S-7"                  "bookmark-goto 7"
182 \bind "C-~S-8"                  "bookmark-goto 8"
183 \bind "C-~S-9"                  "bookmark-goto 9"
184 \bind "C-M-~S-1"                "bookmark-save 1"
185 \bind "C-M-~S-2"                "bookmark-save 2"
186 \bind "C-M-~S-3"                "bookmark-save 3"
187 \bind "C-M-~S-4"                "bookmark-save 4"
188 \bind "C-M-~S-5"                "bookmark-save 5"
189 \bind "C-M-~S-6"                "bookmark-save 6"
190 \bind "C-M-~S-7"                "bookmark-save 7"
191 \bind "C-M-~S-8"                "bookmark-save 8"
192 \bind "C-M-~S-9"                "bookmark-save 9"
193
194
195
196 #
197 # Motion + select group
198 #
199
200 \bind "S-Right"                "char-right-select"
201 \bind "S-Left"                 "char-left-select"
202 \bind "S-C-F"                  "char-forward-select"
203 \bind "S-C-B"                  "char-backward-select"
204 \bind "S-Up"                   "up-select"
205 \bind "S-Down"                 "down-select"
206 \bind "S-C-Right"              "word-right-select"
207 \bind "S-C-Left"               "word-left-select"
208 \bind "S-C-Up"                 "paragraph-up-select"
209 \bind "S-C-Down"               "paragraph-down-select"
210 \bind "S-Home"                 "line-begin-select"
211 \bind "S-End"                  "line-end-select"
212 \bind "S-C-A"                  "line-begin-select"
213 \bind "S-C-E"                  "line-end-select"
214 \bind "S-Prior"                "screen-up-select"
215 \bind "S-Next"                 "screen-down-select"
216 \bind "S-C-Home"               "buffer-begin-select"
217 \bind "S-C-End"                "buffer-end-select"
218
219 #
220 # Edit group
221 #
222
223 \bind "M-Delete"                "word-delete-backward"
224 \bind "C-Delete"                "word-delete-forward"
225 \bind "M-d"                     "word-delete-forward"
226 \bind "C-BackSpace"             "word-delete-backward"
227 \bind "M-Return"                "paragraph-break inverse"
228 \bind "C-Return"                "newline-insert newline"
229 \bind "C-S-Return"              "newline-insert linebreak"
230 \bind "C-S-L"                   "specialchar-insert ligature-break"
231 \bind "C-space"                 "command-alternatives math-space ; space-insert protected"
232 \bind "nobreakspace"            "space-insert protected"
233 \bind "C-M-space"               "space-insert normal"
234 \bind "S-C-space"               "space-insert thin"
235 \bind "M-~S-slash"              "specialchar-insert slash"
236 \bind "C-period"                "specialchar-insert end-of-sentence"
237 \bind "M-period"                "specialchar-insert dots"
238 \bind "M-w"                     "copy"
239 \bind "Escape"                  "meta-prefix"
240
241 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
242 \bind "S-KP_Right"              "char-right-select"
243 \bind "S-KP_Left"               "char-left-select"
244 \bind "S-KP_Up"                 "up-select"
245 \bind "S-KP_Down"               "down-select"
246 \bind "S-C-KP_Right"            "word-right-select"
247 \bind "S-C-KP_Left"             "word-left-select"
248 \bind "S-C-KP_Up"               "paragraph-up-select"
249 \bind "S-C-KP_Down"             "paragraph-down-select"
250 \bind "S-KP_Home"               "line-begin-select"
251 \bind "S-KP_End"                "line-end-select"
252 \bind "S-KP_Prior"              "screen-up-select"
253 \bind "S-KP_Next"               "screen-down-select"
254 \bind "S-C-KP_Home"             "buffer-begin-select"
255 \bind "S-C-KP_End"              "buffer-end-select"
256 \bind "S-C-KP_Prior"            "buffer-begin-select"
257 \bind "S-C-KP_Next"             "buffer-end-select"
258 \bind "C-KP_Insert"             "copy"
259 \bind "S-KP_Insert"             "paste"
260 \bind "S-KP_Delete"             "cut"
261
262
263 ## Trying to incorporate the best of AucTeX and HM--HTML modes
264 ##
265 # "C-z" is used in HM--HTML-mode for paragraph styles so try to support
266 #  similar here.
267 ##
268 \bind "C-c C-l"                 "dialog-show latexlog"        # show warning log
269 \bind "C-c C-v"                 "buffer-chktex"         # validate
270
271 \bind "C-z space"               "drop-layouts-choice"
272 \bind "C-z 1"                   "layout Title"
273 \bind "C-z 2"                   "layout Section"
274 \bind "C-z 3"                   "layout Subsection"
275 \bind "C-z 4"                   "layout Subsubsection"
276 \bind "C-z 5"                   "layout Paragraph"
277 \bind "C-z 6"                   "layout Subparagraph"
278 \bind "C-z a"                   "layout Author"         # address!!
279 \bind "C-z S-A"                 "layout Abstract"
280 \bind "C-z c"                   "layout LyX-Code"
281 \bind "C-z b"                   "font-bold"
282 \bind "C-z d"                   "layout Description"
283 \bind "C-z S-D"                 "layout Date"
284 \bind "C-z e"                   "font-emph"
285 \bind "C-z i"                   "layout Itemize"        # smart-insert-item!!
286 \bind "C-z o"                   "font-emph"             # italic!
287 \bind "C-z q"                   "layout Quote"
288 \bind "C-z s"                   "font-bold"             # strong!
289 \bind "C-c t"                   "font-sans"             # typewriter!
290 \bind "C-c v"                   "font-roman"            # variable!
291 \bind "C-z S-V"                 "layout Verbatim"
292
293 \bind "C-z l d"                 "layout Description"
294 \bind "C-z l t"                 "layout Description"
295 \bind "C-z l o"                 "layout Enumerate"      # numbered list
296 \bind "C-z l l"                 "layout Itemize"        # bulleted list
297 \bind "C-z l u"                 "layout Itemize"        # bulleted list
298 #
299 ## End HM--HTML Mode
300 ##
301 ## Start AucTeX
302 #
303 #\bind "C-u C-c C-f"            "layout-character"
304 \bind "C-c C-f C-b"             "font-bold"
305 \bind "C-c C-f C-c"             "font-noun"
306 \bind "C-c C-f C-e"             "font-emph"
307 \bind "C-c C-f C-i"             "font-emph" #italic
308 \bind "C-c C-f C-s"             "font-emph" #slanted
309
310 \bind "C-c C-f C-f"             "font-sans"
311 \bind "C-c C-f C-r"             "font-roman"
312 \bind "C-c C-f C-t"             "font-typewriter"  #typewriter
313
314 \bind "C-c ~S-asciitilde"               "math-mode"
315
316 \bind "C-c C-s 0"               "layout Standard"
317 \bind "C-c C-s 1"               "layout Chapter"
318 \bind "C-c C-s 2"               "layout Section"
319 \bind "C-c C-s 3"               "layout Subsection"
320 \bind "C-c C-s 4"               "layout Subsubsection"
321 \bind "C-c C-s 5"               "layout Paragraph"
322 \bind "C-c C-s 6"               "layout Subparagraph"
323 \bind "C-c C-e a"               "layout Abstract"
324 \bind "C-c C-e d"               "layout Description"
325 \bind "C-c C-e e"               "layout Enumerate"
326 \bind "C-c C-e i"               "layout Itemize"
327 \bind "C-c C-e l"               "layout List"
328 \bind "C-c C-e m"               "math-display"  # should this be math-mode?
329 \bind "C-c C-e q"               "layout Quote"
330 \bind "C-c C-e S-q"             "layout Quotation"
331 \bind "C-c C-e v"               "layout Quote"
332
333 \bind "C-c C-e f"               "dialog-show-new-inset graphics"  ## should be figure-float
334 \bind "C-c C-e t"               "tabular-insert" ## should be table-float
335
336 \bind "C-c percent"             "layout Comment"
337
338 \bind "C-c Return"              "paragraph-break inverse"
339 #
340 ## End AucTeX
341 #
342 ## Start TeX mode, some overlap with AucTeX mode
343 #
344 \bind "C-c C-b"                 "buffer-update dvi"
345 \bind "C-c C-p"                 "dialog-show print"
346 \bind "C-c C-r"                 "buffer-update dvi"     # tex region
347 #
348 ## End TeX mode
349 #
350
351 ################################
352 # Include menu and math bindings
353
354 \bind_file menus.bind
355 \bind_file math.bind
356 \bind_file latinkeys.bind
357 \bind_file cyrkeys.bind
358 \bind_file greekkeys.bind