]> git.lyx.org Git - lyx.git/blob - lib/bind/mac.bind
ecdd3ad06bbf516716f4a2ab6a08eb204b2c4f83
[lyx.git] / lib / bind / mac.bind
1 # This file is part of
2 # ==================================================================
3 #
4 #                     LyX, the High Level Word Processor
5 #
6 #         Copyright (C) 1995-1997 Asger Alstrup & The LyX Team
7 #
8 # ==================================================================
9
10 #
11 # This is the Mac flavour bind file for LyX/Mac 2.0.x, based on
12 # bindings found in the Mac world.
13 #
14 # DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
15 # with every new install of LyX and your changes will be lost.
16 # Instead, customize a copy of this file placed in
17 # ~/.lyx/bind/.
18 #
19 # Happy tuning!
20
21 # Free bindings:
22
23 #\bind "C-j"
24 #\bind "C-y"
25
26
27 ###
28
29 Format 2
30
31 # based on the table at http://support.apple.com/kb/HT1343
32 # Note: these bindings assume the swapped Meta and Control modifiers standard of Qt
33 # Command - C
34 # Option  - A
35 # Control - M
36
37 # Status indicates if it is matching the mac standard
38 #  +: correct binding
39 #  -: missing or wrong binding
40 # Status: "Key combination"            What it does
41 #  +: "Command-Space"                # Show or hide the Spotlight search field (if multiple languages are installed, may rotate through enabled script systems)
42 #  +: "Option-Command-Space"         # Show the Spotlight search results window (if multiple languages are installed, may rotate through keyboard layouts and input methods within a script)
43 #  +: "Command-esc"                  # Open Front Row (if installed)
44 #  +: "Option-Eject"                 # Eject from secondary optical media drive (if one is installed)
45 #  +: "Control-Eject"                # Show shutdown dialog
46 #  +: "Option-Command-Eject"         # Put the computer to sleep
47 #  +: "Control-Command-Eject"        # Quit all applications (after giving you a chance to save changes to open documents), then restart the computer
48 #  +: "Control Option-Command-Eject" # Quit all applications (after giving you a chance to save changes to open documents), then shut down the computer
49 #  +: "Command-Tab"                  # Move forward to the next most recently used application in a list of open applications
50 #  +: "Shift-Command-Tab"            # Move backward through a list of open applications (sorted by recent use)
51 #  -: "Control-A"                    # Move to beginning of line/paragraph
52 # used by menu.bind - paragraph-params
53 #  +: "Control-B"                    # Move one character backward
54 \bind "M-b"                          "char-backward"
55 #  +: "Control-D"                    # Delete the character in front of the cursor
56 \bind "M-d"                          "char-delete-forward"
57 #  +: "Control-E"                    # Move to end of line/paragraph
58 \bind "M-e"                          "line-end"
59 #  +: "Control-F"                    # Move one character forward
60 \bind "M-f"                          "char-forward"
61 #  +: "Control-H"                    # Delete the character behind the cursor
62 \bind "M-h"                          "char-delete-backward"
63 #  -: "Control-K"                    # Delete from the character in front of the cursor to the end of the line/paragraph
64 # used by menu.bind - keymap
65 #  +: "Control-L"                    # Center the cursor/selection in the visible area
66 \bind "M-l"                          "screen-recenter"
67 \bind "F5"                           "screen-recenter"
68 #  +: "Control-N"                    # Move down one line
69 \bind "M-n"                          "down"
70 #  +: "Control-O"                    # Insert a new line after the cursor
71 \bind "M-o"                          "paragraph-break"
72 #  -: "Control-P"                    # Move up one line
73 # used by menu.bind - layouts
74 #  +: "Control-T"                    # Transpose the character behind the cursor and the character in front of the cursor
75 \bind "M-t"                          "chars-transpose"
76 #  +: "Control-V"                    # Move down one page
77 \bind "M-v"                          "scroll page up"
78 #  -: "Shift-Tab"                    # Navigate through controls in a reverse direction
79 #  +: "Control-Tab"                  # Move focus to the next grouping of controls in a dialog or the next table (when Tab moves to the next cell)
80 \bind "M-Tab"                        "buffer-next"
81 \bind "A-Tab"                        "buffer-next"
82 #  +: "Shift-Control-Tab"            # Move focus to the previous grouping of controls
83 \bind "M-S-BackTab"                  "buffer-previous"
84 \bind "A-S-BackTab"                  "buffer-previous"
85 #  +: "fn-Delete"                    # Forward Delete (on portable Macs' built-in keyboard)
86 \bind "Delete"                       "char-delete-forward"
87 #  ?: "Control-F1"                   # Toggle full keyboard access on or off
88 #  +: "Control-F2"                   # Move focus to the menu bar
89 #  +: "Control-F3"                   # Move focus to the Dock
90 #  +: "Control-F4"                   # Move focus to the active (or next) window
91 #  +: "Shift-Control-F4"             # Move focus to the previously active window
92 #  -: "Control-F5"                   # Move focus to the toolbar.
93 #  -: "Control-F6"                   # Move focus to the first (or next) panel
94 #  -: "Shift-Control-F6"             # Move focus to the previous panel
95 #  -: "Control-F7"                   # Temporarily override the current keyboard access mode in windows and dialogs
96 #  -: "F9"                           # Tile or untile all open windows
97 #  -: "F10"                          # Tile or untile all open windows in the currently active application
98 #  +: "F11"                          # Hide or show all open windows
99 #  +: "F12"                          # Hide or display Dashboard
100 #  -: "Command-`"                    # Activate the next open window in the frontmost application
101 #  -: "Shift-Command-`"              # Activate the previous open window in the frontmost application
102 #  -: "Option-Command-`"             # Move focus to the window drawer
103 #  +: "Command- - (minus)"           # Decrease the size of the selected item
104 \bind "C-minus"                      "buffer-zoom-out"
105 #  +: "Shift-Command-="              # Increase the size of the selected item
106 \bind "C-plus"                       "buffer-zoom-in"
107 \bind "C-S-equal"                    "buffer-zoom-in"
108 \bind "C-equal"                      "buffer-zoom-in"
109 #  -: "Command-{"                    # Left-align a selection
110 #  -: "Command-}"                    # Right-align a selection
111 #  -: "Command-|"                    # Center-align a selection
112 #  -: "Command-:"                    # Display the Spelling window
113 #  +: "Command-;"                    # Find misspelled words in the document
114 \bind "C-S-semicolon"                "dialog-show spellchecker"
115 #  +: "Command-,"                    # Open the front application's preferences window (if it supports this keyboard shortcut)
116 \bind "C-comma"                      "dialog-show prefs"
117 #  +: "Option-Control-Command-,"     # Decrease screen contrast
118 #  +: "Option-Control-Command-."     # Increase screen contrast
119 #  -: "Command-?"                    # Open the application's help in Help Viewer
120 #  -: "Option-Command-/"             # Turn font smoothing on or off
121 #  +: "Shift-Command-3"              # Capture the screen to a file
122 #  +: "Shift-Control-Command-3"      # Capture the screen to the Clipboard
123 #  +: "Shift-Command-4"              # Capture a selection to a file
124 #  +: "Shift-Control-Command-4"      # Capture a selection to the Clipboard
125 #  +: "Command-A"                    # Highlight every item in a document or window, or all characters in a text field
126 \bind "C-M-a"                        "command-sequence buffer-begin ; buffer-end-select"
127 \bind "C-a"                          "inset-select-all"
128 #  +: "Command-B"                    # Boldface the selected text or toggle boldfaced text on and off
129 \bind "C-M-b"                        "font-boldsymbol"
130 \bind "C-b"                          "font-bold"
131 #  +: "Command-C"                    # Copy the selected data to the Clipboard
132 \bind "C-c"                          "copy"
133 #  -: "Shift-Command-C"              # Display the Colors window
134 #  -: "Option-Command-C"             # Copy the style of the selected text
135 #  -: "Control-Command-C"            # Copy the formatting settings of the selected item and store on the Clipboard
136 #  +: "Option-Command-D"             # Show or hide the Dock
137 #  -: "Command-Control D"            # Display the definition of the selected word in the Dictionary application
138 \bind "C-d"                          "buffer-view dvi"  # 'd' for dvi
139 \bind "C-M-d"                        "master-buffer-view dvi"
140 \bind "C-S-D"                        "buffer-update dvi"        # 'd' for dvi
141 #  -: "Command-E"                    # Use the selection for a find
142 \bind "C-e"                          "font-emph"
143 #  +: "Command-F"                    # Open a Find window
144 \bind "C-f"                          "dialog-show findreplace"
145 \bind "C-S-f"                        "dialog-show findreplaceadv"
146 #  -: "Option-Command-F"             # Move to the search field control
147 #  +: "Command-G"                    # Find the next occurrence of the selection
148 \bind "C-g"                          "word-find-forward"
149 #  +: "Shift-Command-G"              # Find the previous occurrence of the selection
150 \bind "C-S-g"                        "word-find-backward"
151 #  +: "Command-H"                    # Hide the windows of the currently running application
152 #  +: "Option-Command-H"             # Hide the windows of all other running applications
153 #  -: "Command-I"                    # Italicize the selected text or toggle italic text on or off
154 \bind "C-i"                          "inset-toggle" # 'i' for Inset
155 #  -: "Option-Command-I"             # Display an inspector window
156 #  -: "Command-J"                    # Scroll to a selection
157 \bind "C-k"                          "line-delete-forward"
158 #  -: "Command-M"                    # Minimize the active window to the Dock
159 #  -: "Option-Command-M"             # Minimize all windows of the active application to the Dock
160 \bind "C-m"                          "math-mode"
161 \bind "C-S-M"                        "math-display"
162 \bind "C-M-n"                        "command-sequence math-display; math-number-toggle;"
163 #  +: "Command-N"                    # Create a new document in the frontmost application
164 \bind "C-n"                          "buffer-new"
165 \bind "C-S-N"                        "buffer-new-template"
166 #  +: "Command-O"                    # Display a dialog for choosing a document to open in the frontmost application
167 \bind "C-o"                          "file-open"
168 #  +: "Command-P"                    # Display the Print dialog
169 \bind "C-p"                          "dialog-show print"
170 #  -: "Shift-Command-P"              # Display a dialog for specifying printing parameters (Page Setup)
171 \bind "C-S-P"                        "font-typewriter" # 'P' for Program
172 #  +: "Command-Q"                    # Quit the frontmost application
173 \bind "C-q"                          "lyx-quit"
174 \bind "C-r"                          "buffer-view"
175 #  +: "Command-S"                    # Save the active document
176 \bind "C-s"                          "buffer-write"
177 #  +: "Shift-Command-S"              # Display the Save As dialog
178 \bind "C-S-S"                        "buffer-write-as"
179 #  -: "Command-T"                    # Display the Fonts window
180 \bind "C-t"                          "buffer-view pdf"
181 \bind "C-M-t"                        "master-buffer-view pdf"
182 #  -: "Option-Command-T"             # Show or hide a toolbar
183 #  -: "Command-U"                    # Underline the selected text or turn underlining on or off
184 \bind "C-u"                          "font-underline"
185 #  +: "Command-V"                    # Paste the Clipboard contents at the insertion point
186 \bind "C-v"                          "paste"
187 \bind "C-S-v"                        "clipboard-paste"
188 #  -: "Option-Command-V"             # Apply the style of one object to the selected object (Paste Style)
189 #  -: "Option-Shift-Command-V"       # Apply the style of the surrounding text to the inserted object (Paste and Match Style)
190 #  -: "Control-Command-V"            # Apply formatting settings to the selected object (Paste Ruler Command)
191 \bind "C-M-v"                        "primary-selection-paste"
192 #  ?: "Command-W"                    # Close the frontmost window
193 \bind "C-w"                          "buffer-close" # should be "window-close"
194 #  +: "Shift-Command-W"              # Close a file and its associated windows
195 \bind "C-S-w"                        "buffer-close"
196 #  +: "Option-Command-W"             # Close all windows in the application without quitting it
197 \bind "C-A-w"                        "buffer-close-all"
198 #  +: "Command-X"                    # Remove the selection and store in the Clipboard
199 \bind "C-x"                          "cut"
200 \bind "M-x"                          "command-execute"
201 #  -: "Command-Z"                    # Undo previous command (some applications allow for multiple Undos)
202 \bind "C-z"                          "undo"
203 #  -: "Shift-Command-Z"              # Redo previous command (some applications allow for multiple Redos)
204 \bind "C-S-Z"                        "redo"
205 #  -: "Control-Right Arrow"          # Move focus to another value or cell within a view, such as a table
206 #  -: "Control-Left Arrow"           # Move focus to another value or cell within a view, such as a table
207 #  -: "Control-Down Arrow"           # Move focus to another value or cell within a view, such as a table
208 #  -: "Control-Up Arrow"             # Move focus to another value or cell within a view, such as a table
209 #  +: "Command-Right Arrow"          # Move the text insertion point to the end of the current line
210 \bind "C-Right"                      "line-end"
211 #  +: "Command-Left Arrow"           # Move the text insertion point to the beginning of the current line
212 \bind "C-Left"                       "line-begin"
213 #  +: "Command-Down Arrow"           # Move the text insertion point to the end of the document
214 \bind "C-Down"                       "buffer-end"
215 \bind "M-A-Down"                     "inset-end" 
216 #  +: "Command-Up Arrow"             # Move the text insertion point to the beginning of the document
217 \bind "C-Up"                         "buffer-begin"
218 \bind "M-A-Up"                       "inset-begin" 
219 #  +: "Shift-Command-Right Arrow"    # Select text between the insertion point and the end of the current line (*)
220 \bind "S-C-Right"                    "line-end-select"
221 #  +: "Shift-Command-Left Arrow"     # Select text between the insertion point and the beginning of the current line (*)
222 \bind "S-C-Left"                     "line-begin-select"
223 #  +: "Shift-Right Arrow"            # Extend text selection one character to the right (*)
224 \bind "S-Right"                      "char-right-select"
225 #  +: "Shift-Left Arrow"             # Extend text selection one character to the left (*)
226 \bind "S-Left"                       "char-left-select"
227 #  +: "Shift-Command-Up Arrow"       # Select text between the insertion point and the beginning of the document (*)
228 \bind "S-C-Up"                       "buffer-begin-select"
229 #  +: "Shift-Command-Down Arrow"     # Select text between the insertion point and the end of the document (*)
230 \bind "S-C-Down"                     "buffer-end-select"
231 #  +: "Shift-Up Arrow"               # Extend text selection to the line above, to the nearest character boundary at the same horizontal location (*)
232 \bind "S-Up"                         "up-select"
233 #  +: "Shift-Down Arrow"             # Extend text selection to the line below, to the nearest character boundary at the same horizontal location (*)
234 \bind "S-Down"                       "down-select"
235 #  +: "Shift-Option-Right Arrow"     # Extend text selection to the end of the current word, then to the end of the following word if pressed again (*)
236 \bind "A-Right"                      "word-right"
237 \bind "S-A-Right"                    "word-right-select"
238 #  +: "Shift-Option-Left Arrow"      # Extend text selection to the beginning of the current word, then to the beginning of the following word if pressed again (*)
239 \bind "A-Left"                       "word-left"
240 \bind "S-A-Left"                     "word-left-select"
241 #  +: "Shift-Option-Down Arrow"      # Extend text selection to the end of the current paragraph, then to the end of the following paragraph if pressed again (*)
242 \bind "A-Down"                       "paragraph-down"
243 \bind "S-A-Down"                     "paragraph-down-select"
244 \bind "S-M-A-Down"                   "inset-end-select" 
245 #  +: "Shift-Option-Up Arrow"        # Extend text selection to the beginning of the current paragraph, then to the beginning of the following paragraph if pressed again (*)
246 \bind "A-Up"                         "paragraph-up"
247 \bind "S-A-Up"                       "paragraph-up-select"
248 \bind "S-M-A-Up"                     "inset-begin-select" 
249 #  -: "Control-Space"                # Toggle between the current and previous input sources
250 #  -: "Option-Control-Space"         # Toggle through all enabled input sources
251 #  +: "Option-Command-esc"           # Force Quit
252
253 # Additional commands
254
255 \bind "C-S-O"                        "font-strikeout"
256 \bind "C-S-T"                        "buffer-update pdf" # (pdflatex; was "ps")
257 \bind "C-S-R"                        "buffer-update"
258 \bind "C-M-S-T"                      "master-buffer-update pdf"
259 \bind "C-M-S-D"                      "master-buffer-update dvi"
260
261 \bind "C-S-E"                        "changes-track" # it's what MS Word uses
262 \bind "~S-M-quotedbl"                "quote-insert single"
263 \bind "~S-C-quotedbl"                "self-insert \""
264 \bind "C-S-underscore"               "command-alternatives math-macro-fold;specialchar-insert hyphenation"
265 \bind "C-M-minus"                    "specialchar-insert nobreakdash"
266 \bind "M-C-Right"                    "depth-increment"
267 \bind "M-C-Left"                     "depth-decrement"
268 \bind "C-S-L"                        "specialchar-insert ligature-break"
269 \bind "C-l"                          "ert-insert"               # 'l' for LaTeX
270 \bind "C-S-I"                        "info-insert"
271
272 #bind "F1"                           "help"         # Not yet implemented!
273 #bind "C-F1"                         "help-context" # Not yet implemented!
274 \bind "F2"                           "buffer-write"
275 \bind "C-F4"                         "buffer-close"
276 \bind "C-A-Up"                       "scroll line up"
277 \bind "C-A-Down"                     "scroll line down"
278 \bind "C-A-Prior"                    "scroll page up"
279 \bind "C-A-Next"                     "scroll page down"
280 \bind "F7"                           "dialog-show spellchecker"
281 \bind "S-F7"                         "thesaurus-entry"
282
283 \bind "C-M-o"                        "dialog-show toc"
284
285 #
286 # Additional Motion group
287 #
288
289 \bind "C-~S-greater"                 "label-goto"
290 \bind "C-~S-less"                            "bookmark-goto 0"
291
292 #
293 # Additional Motion + select group
294 #
295
296 \bind "S-Prior"                      "screen-up-select"
297 \bind "S-Next"                       "screen-down-select"
298 \bind "C-Insert"                     "copy"
299 \bind "S-Insert"                     "paste"
300 \bind "S-Delete"                     "cut"
301
302 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
303 \bind "S-KP_Right"                   "char-right-select"
304 \bind "S-KP_Left"                    "char-left-select"
305 \bind "S-KP_Up"                      "up-select"
306 \bind "S-KP_Down"                    "down-select"
307 \bind "S-M-KP_Right"                 "word-right-select"
308 \bind "S-M-KP_Left"                  "word-left-select"
309 \bind "S-M-KP_Up"                    "paragraph-up-select"
310 \bind "S-M-KP_Down"                  "paragraph-down-select"
311 \bind "S-KP_Home"                    "line-begin-select"
312 \bind "S-KP_End"                     "line-end-select"
313 \bind "S-KP_Prior"                   "screen-up-select"
314 \bind "S-KP_Next"                    "screen-down-select"
315 \bind "S-C-KP_Home"                  "buffer-begin-select"
316 \bind "S-C-KP_End"                   "buffer-end-select"
317 \bind "S-C-KP_Prior"                 "buffer-begin-select"
318 \bind "S-C-KP_Next"                  "buffer-end-select"
319 \bind "C-KP_Insert"                  "copy"
320 \bind "S-KP_Insert"                  "paste"
321 \bind "S-KP_Delete"                  "cut"
322
323 #
324 # bookmarks
325 #
326
327 \bind "C-~S-1"                       "bookmark-goto 1"
328 \bind "C-~S-2"                       "bookmark-goto 2"
329 \bind "C-~S-3"                       "bookmark-goto 3"
330 \bind "C-~S-4"                       "bookmark-goto 4"
331 \bind "C-~S-5"                       "bookmark-goto 5"
332 \bind "C-~S-6"                       "bookmark-goto 6"
333 \bind "C-~S-7"                       "bookmark-goto 7"
334 \bind "C-~S-8"                       "bookmark-goto 8"
335 \bind "C-~S-9"                       "bookmark-goto 9"
336 \bind "C-M-~S-1"                     "bookmark-save 1"
337 \bind "C-M-~S-2"                     "bookmark-save 2"
338 \bind "C-M-~S-3"                     "bookmark-save 3"
339 \bind "C-M-~S-4"                     "bookmark-save 4"
340 \bind "C-M-~S-5"                     "bookmark-save 5"
341 \bind "C-M-~S-6"                     "bookmark-save 6"
342 \bind "C-M-~S-7"                     "bookmark-save 7"
343 \bind "C-M-~S-8"                     "bookmark-save 8"
344 \bind "C-M-~S-9"                     "bookmark-save 9"
345
346 #
347 # Additional Edit group
348 #
349
350 \bind "A-Delete"                     "word-delete-forward"
351 \bind "A-BackSpace"                  "word-delete-backward"
352 \bind "M-Return"                     "paragraph-break inverse"
353 \bind "C-Return"                     "newline-insert newline"
354 \bind "C-S-Return"                   "newline-insert linebreak"
355 \bind "A-space"                      "command-alternatives math-space ; space-insert protected"
356 \bind "nobreakspace"                 "space-insert protected"
357 \bind "C-A-space"                    "space-insert normal"
358 \bind "S-A-space"                    "space-insert thin"
359 \bind "C-~S-slash"                   "specialchar-insert slash"
360 \bind "C-period"                     "specialchar-insert end-of-sentence"
361 \bind "M-period"                     "specialchar-insert dots"
362 \bind "Escape"                       "cancel"
363 \bind "C-M-Up"                       "command-alternatives outline-up; paragraph-move-up; inset-modify tabular move-row-up"
364 \bind "C-M-Down"                     "command-alternatives outline-down; paragraph-move-down; inset-modify tabular move-row-down"
365 \bind "C-M-Right"                    "inset-modify tabular move-column-right"
366 \bind "C-M-Left"                     "inset-modify tabular move-column-left"
367 #\bind "F9"                          "meta-prefix"
368
369 # Include menu and math bindings
370
371 \bind_file menus.bind
372 \bind_file math.bind
373 \bind_file latinkeys.bind
374 \bind_file cyrkeys.bind
375 \bind_file greekkeys.bind