]> git.lyx.org Git - lyx.git/blob - lib/bind/cua.bind
Reformat lyx2lyx code using ruff
[lyx.git] / lib / bind / cua.bind
1 # -*- text -*-
2
3 # file cua.bind
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6
7 # author Asger Alstrup
8 # author Lars Gullik Bjønnes
9 # author Jean-Marc Lasgouttes
10 # author Angus Leeming
11 # author John Levon
12 # author Jürgen Spitzmüller
13 # author Dekel Tsur
14 # author Jürgen Vigna
15 # author Andrew Zabolotny
16
17 # Full author contact details are available in file CREDITS.
18
19 # This is the CUA (Common User Access) flavour bind file, based on
20 # bindings found in the Windows, Mac and Motif world.
21
22 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
23 # with every new install of LyX and your changes will be lost.
24 # Instead, customize a copy of this file placed in
25 # ~/.lyx/bind/cua.bind
26 #
27 # Happy tuning!
28
29 # Note: modifiers on PC keyboards:
30 # C - Ctrl
31 # M - Alt
32 # S - Shift
33 #~S - Ignore shift (useful for numbers on localized keyboards)
34
35 # Free bindings:
36
37 #\bind "C-h"
38 #\bind "C-j"
39
40
41 ###
42
43 Format 5
44
45 \bind "C-n"                     "buffer-new"
46 \bind "C-S-N"                   "dialog-show lyxfiles templates"
47 \bind "C-o"                     "file-open"
48 \bind "C-w"                     "view-close"
49 \bind "C-s"                     "buffer-write"
50 \bind "C-S-S"                   "buffer-write-as"
51 \bind "C-r"                     "buffer-view"
52 \bind "C-d"                     "buffer-view dvi"       # 'd' for dvi
53 \bind "C-t"                     "buffer-view ps"
54 \bind "C-M-r"                   "command-alternatives master-buffer-view; buffer-view"
55 \bind "C-M-t"                   "command-alternatives master-buffer-view ps; buffer-view ps"
56 \bind "C-M-d"                   "command-alternatives master-buffer-view dvi; buffer-view dvi"
57 \bind "C-S-R"                   "buffer-update"
58 \bind "C-S-D"                   "buffer-update dvi"     # 'd' for dvi
59 \bind "C-S-T"                   "buffer-update ps"
60 \bind "C-M-S-t"                 "command-alternatives master-buffer-update ps; buffer-update ps"
61 \bind "C-M-S-d"                 "command-alternatives master-buffer-update dvi; buffer-update dvi"
62 \bind "C-q"                     "lyx-quit"
63 \bind "C-Next"                  "buffer-next"
64 \bind "C-Tab"                   "buffer-next"
65 \bind "C-Prior"                 "buffer-previous"
66 \bind "C-S-BackTab"             "buffer-previous"
67
68 \bind "C-M-b"                   "font-bold"
69 \bind "C-b"                     "font-boldsymbol"
70 \bind "C-e"                     "font-emph"
71 # used below for line-delete-forward
72 #\bind "C-k"                    "font-noun"             # 'k' for capitals
73 \bind "C-u"                     "font-underline"
74 \bind "C-S-P"                   "font-typewriter" # 'P' for Program
75 \bind "C-S-O"                   "font-strikeout"
76
77 \bind "C-m"                     "math-mode"
78 \bind "C-S-M"                   "math-display"
79 \bind "C-M-n"                   "command-sequence math-display; math-number-toggle;"
80
81 \bind "C-f"                     "dialog-show findreplace"
82 \bind "C-S-f"                   "dialog-show findreplaceadv"
83 \bind "C-i"                     "inset-toggle"          # 'i' for Inset
84 \bind "C-M-i"                   "inset-settings"
85
86 \bind "C-c"                     "copy"
87 \bind "C-x"                     "cut"
88 \bind "C-v"                     "paste"
89 \bind "C-S-v"                   "clipboard-paste"
90 \bind "C-M-v"                   "primary-selection-paste"
91 # "join lines"
92 \bind "C-S-M-v"                 "clipboard-paste paragraph"
93
94 \bind "C-z"                     "undo"
95 \bind "C-y"                     "redo"
96 \bind "C-S-Z"                   "redo"
97
98 \bind "C-M-a"                   "command-sequence buffer-begin ; buffer-end-select"   # select all
99 \bind "C-a"                     "inset-select-all"
100
101 \bind "C-S-E"                   "changes-track"  # it's what MS Word uses
102 \bind "~S-M-quotedbl"           "quote-insert inner"
103 \bind "~S-C-quotedbl"           "quote-insert outer auto plain"
104 \bind "~S-C-apostrophe"         "quote-insert inner auto plain"
105 \bind "M-minus"                 "specialchar-insert hyphenation"
106 \bind "C-S-underscore"          "math-macro-fold"
107 \bind "C-M-minus"               "specialchar-insert nobreakdash"
108 \bind "M-S-Right"               "depth-increment"
109 \bind "M-S-Left"                "depth-decrement"
110 \bind "C-S-L"                   "specialchar-insert ligature-break"
111 \bind "C-~S-slash"              "specialchar-insert slash"
112 \bind "C-l"                     "ert-insert"            # 'l' for LaTeX
113 \bind "C-S-I"                   "info-insert"
114
115 #bind "F1"                      "help"                  # Not yet implemented!
116 #bind "C-F1"                    "help-context"          # Not yet implemented!
117 \bind "F2"                      "buffer-write force"
118 \bind "F3"                      "word-find"
119 \bind "S-F3"                    "word-find-backward"
120 \bind "C-F3"                    "search-string-set"
121 \bind "C-F4"                    "buffer-close"
122 \bind "M-F4"                    "lyx-quit"
123 \bind "F5"                      "screen-recenter"
124 \bind "C-M-Up"                  "scroll line up"
125 \bind "C-M-Down"                "scroll line down"
126 \bind "C-M-Prior"               "scroll page up"
127 \bind "C-M-Next"                "scroll page down"
128 \bind "F6"                      "tab-group-next"
129 \bind "S-F6"                    "tab-group-previous"
130 \bind "C-F6"                    "buffer-next"
131 \bind "C-S-F6"                  "buffer-previous"
132 \bind "F7"                      "dialog-show spellchecker"
133 \bind "S-F7"                    "thesaurus-entry"
134
135 \bind "M-x"                     "command-execute"
136 \bind "C-M-o"                   "dialog-show toc"
137
138 \bind "F11"                     "ui-toggle fullscreen"
139
140 \bind "C-0"                     "buffer-zoom"
141 \bind "C-equal"                 "buffer-zoom-in"
142 \bind "C-plus"                  "buffer-zoom-in"
143 \bind "C-minus"                 "buffer-zoom-out"
144
145 #
146 # Motion group
147 #
148
149 \bind "M-Up"                    "command-alternatives outline-up; paragraph-move-up; tabular-feature move-row-up"
150 \bind "M-Down"                  "command-alternatives outline-down; paragraph-move-down; tabular-feature move-row-down"
151 \bind "M-Right"                 "tabular-feature move-column-right"
152 \bind "M-Left"                  "tabular-feature move-column-left"
153 \bind "C-Right"                 "word-right"
154 \bind "C-Left"                  "word-left"
155 \bind "C-Up"                    "paragraph-up"
156 \bind "C-Down"                  "paragraph-down"
157 \bind "C-Home"                  "buffer-begin"
158 \bind "C-End"                   "buffer-end"
159 \bind "M-C-Home"                "inset-begin"
160 \bind "M-C-End"                 "inset-end"
161
162 \bind "C-~S-greater"            "label-goto"
163 \bind "C-~S-less"               "bookmark-goto 0"
164
165 #
166 # Motion + select group
167 #
168
169 \bind "S-Right"                 "char-right-select"
170 \bind "S-Left"                  "char-left-select"
171 \bind "S-Up"                    "up-select"
172 \bind "S-Down"                  "down-select"
173 \bind "S-C-Right"               "word-right-select"
174 \bind "S-C-Left"                "word-left-select"
175 \bind "S-C-Up"                  "paragraph-up-select"
176 \bind "S-C-Down"                "paragraph-down-select"
177 \bind "S-Home"                  "line-begin-select"
178 \bind "S-End"                   "line-end-select"
179 \bind "S-Prior"                 "screen-up-select"
180 \bind "S-Next"                  "screen-down-select"
181 \bind "S-C-Home"                "buffer-begin-select"
182 \bind "S-C-End"                 "buffer-end-select"
183 \bind "S-M-C-Home"              "inset-begin-select"
184 \bind "S-M-C-End"               "inset-end-select"
185 \bind "C-Insert"                "copy"
186 \bind "S-Insert"                "paste"
187 \bind "S-Delete"                "cut"
188
189 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
190 \bind "S-KP_Right"              "char-right-select"
191 \bind "S-KP_Left"               "char-left-select"
192 \bind "S-KP_Up"                 "up-select"
193 \bind "S-KP_Down"               "down-select"
194 \bind "S-C-KP_Right"            "word-right-select"
195 \bind "S-C-KP_Left"             "word-left-select"
196 \bind "S-C-KP_Up"               "paragraph-up-select"
197 \bind "S-C-KP_Down"             "paragraph-down-select"
198 \bind "S-KP_Home"               "line-begin-select"
199 \bind "S-KP_End"                "line-end-select"
200 \bind "S-KP_Prior"              "screen-up-select"
201 \bind "S-KP_Next"               "screen-down-select"
202 \bind "S-C-KP_Home"             "buffer-begin-select"
203 \bind "S-C-KP_End"              "buffer-end-select"
204 \bind "S-C-KP_Prior"            "buffer-move-previous"
205 \bind "S-C-KP_Next"             "buffer-move-next"
206 \bind "C-KP_Insert"             "copy"
207 \bind "S-KP_Insert"             "paste"
208 \bind "S-KP_Delete"             "cut"
209
210 #
211 # bookmarks
212 #
213
214 \bind "C-~S-1"          "bookmark-goto 1"
215 \bind "C-~S-2"          "bookmark-goto 2"
216 \bind "C-~S-3"          "bookmark-goto 3"
217 \bind "C-~S-4"          "bookmark-goto 4"
218 \bind "C-~S-5"          "bookmark-goto 5"
219 \bind "C-~S-6"          "bookmark-goto 6"
220 \bind "C-~S-7"          "bookmark-goto 7"
221 \bind "C-~S-8"          "bookmark-goto 8"
222 \bind "C-~S-9"          "bookmark-goto 9"
223 \bind "M-~S-1"          "bookmark-save 1"
224 \bind "M-~S-2"          "bookmark-save 2"
225 \bind "M-~S-3"          "bookmark-save 3"
226 \bind "M-~S-4"          "bookmark-save 4"
227 \bind "M-~S-5"          "bookmark-save 5"
228 \bind "M-~S-6"          "bookmark-save 6"
229 \bind "M-~S-7"          "bookmark-save 7"
230 \bind "M-~S-8"          "bookmark-save 8"
231 \bind "M-~S-9"          "bookmark-save 9"
232
233
234 #
235 # Edit group
236 #
237
238 \bind "C-Delete"                "word-delete-forward confirm"
239 \bind "C-BackSpace"             "word-delete-backward confirm"
240 \bind "M-Return"                "paragraph-break inverse"
241 \bind "C-Return"                "newline-insert newline"
242 \bind "C-S-Return"              "newline-insert linebreak"
243 \bind "C-k"                     "line-delete-forward"
244 \bind "C-space"                 "command-alternatives math-space ; space-insert protected"
245 \bind "nobreakspace"            "space-insert protected"
246 \bind "C-M-space"               "space-insert normal"
247 \bind "S-C-space"               "space-insert thin"
248 \bind "C-~S-period"             "specialchar-insert end-of-sentence"
249 \bind "M-~S-period"             "specialchar-insert dots"
250 \bind "Escape"                  "cancel"
251 \bind "F9"                      "meta-prefix"
252
253 # Include menu and math bindings
254
255 \bind_file menus.bind
256 \bind_file math.bind
257 \bind_file latinkeys.bind
258 \bind_file cyrkeys.bind
259 \bind_file greekkeys.bind