]> git.lyx.org Git - lyx.git/blob - lib/bind/mac.bind
generate_contributions.py: add Nickolay Shashkin and update maintainer status
[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 1
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"                          "break-paragraph"
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 #  +: "Shift-Control-Tab"            # Move focus to the previous grouping of controls
82 \bind "M-S-BackTab"                  "buffer-previous"
83 #  +: "fn-Delete"                    # Forward Delete (on portable Macs' built-in keyboard)
84 \bind "Delete"                       "char-delete-forward"
85 #  ?: "Control-F1"                   # Toggle full keyboard access on or off
86 #  +: "Control-F2"                   # Move focus to the menu bar
87 #  +: "Control-F3"                   # Move focus to the Dock
88 #  +: "Control-F4"                   # Move focus to the active (or next) window
89 #  +: "Shift-Control-F4"             # Move focus to the previously active window
90 #  -: "Control-F5"                   # Move focus to the toolbar.
91 #  -: "Control-F6"                   # Move focus to the first (or next) panel
92 #  -: "Shift-Control-F6"             # Move focus to the previous panel
93 #  -: "Control-F7"                   # Temporarily override the current keyboard access mode in windows and dialogs
94 #  -: "F9"                           # Tile or untile all open windows
95 #  -: "F10"                          # Tile or untile all open windows in the currently active application
96 #  +: "F11"                          # Hide or show all open windows
97 #  +: "F12"                          # Hide or display Dashboard
98 #  -: "Command-`"                    # Activate the next open window in the frontmost application
99 #  -: "Shift-Command-`"              # Activate the previous open window in the frontmost application
100 #  -: "Option-Command-`"             # Move focus to the window drawer
101 #  +: "Command- - (minus)"           # Decrease the size of the selected item
102 \bind "C-minus"                      "buffer-zoom-out"
103 #  ?: "Shift-Command-="              # Increase the size of the selected item
104 \bind "C-plus"                       "buffer-zoom-in"
105 #  -: "Command-{"                    # Left-align a selection
106 #  -: "Command-}"                    # Right-align a selection
107 #  -: "Command-|"                    # Center-align a selection
108 #  -: "Command-:"                    # Display the Spelling window
109 #  +: "Command-;"                    # Find misspelled words in the document
110 \bind "C-S-semicolon"                "dialog-show spellchecker"
111 #  +: "Command-,"                    # Open the front application's preferences window (if it supports this keyboard shortcut)
112 \bind "C-comma"                      "dialog-show prefs"
113 #  +: "Option-Control-Command-,"     # Decrease screen contrast
114 #  +: "Option-Control-Command-."     # Increase screen contrast
115 #  -: "Command-?"                    # Open the application's help in Help Viewer
116 #  -: "Option-Command-/"             # Turn font smoothing on or off
117 #  +: "Shift-Command-3"              # Capture the screen to a file
118 #  +: "Shift-Control-Command-3"      # Capture the screen to the Clipboard
119 #  +: "Shift-Command-4"              # Capture a selection to a file
120 #  +: "Shift-Control-Command-4"      # Capture a selection to the Clipboard
121 #  +: "Command-A"                    # Highlight every item in a document or window, or all characters in a text field
122 \bind "C-a"                          "command-sequence buffer-begin ; buffer-end-select"
123 \bind "C-M-a"                        "inset-select-all"
124 #  +: "Command-B"                    # Boldface the selected text or toggle boldfaced text on and off
125 \bind "C-M-b"                        "font-boldsymbol"
126 \bind "C-b"                          "font-bold"
127 #  +: "Command-C"                    # Copy the selected data to the Clipboard
128 \bind "C-c"                          "copy"
129 #  -: "Shift-Command-C"              # Display the Colors window
130 #  -: "Option-Command-C"             # Copy the style of the selected text
131 #  -: "Control-Command-C"            # Copy the formatting settings of the selected item and store on the Clipboard
132 #  +: "Option-Command-D"             # Show or hide the Dock
133 #  -: "Command-Control D"            # Display the definition of the selected word in the Dictionary application
134 \bind "C-d"                          "buffer-view dvi"  # 'd' for dvi
135 \bind "C-M-d"                        "master-buffer-view dvi"
136 \bind "C-S-D"                        "buffer-update dvi"        # 'd' for dvi
137 #  -: "Command-E"                    # Use the selection for a find
138 \bind "C-e"                          "font-emph"
139 #  +: "Command-F"                    # Open a Find window
140 \bind "C-f"                          "dialog-show findreplace"
141 \bind "C-S-f"                        "dialog-show findreplaceadv"
142 #  -: "Option-Command-F"             # Move to the search field control
143 #  +: "Command-G"                    # Find the next occurrence of the selection
144 \bind "C-g"                          "word-find-forward"
145 #  +: "Shift-Command-G"              # Find the previous occurrence of the selection
146 \bind "C-S-g"                        "word-find-backward"
147 #  +: "Command-H"                    # Hide the windows of the currently running application
148 #  +: "Option-Command-H"             # Hide the windows of all other running applications
149 #  -: "Command-I"                    # Italicize the selected text or toggle italic text on or off
150 \bind "C-i"                          "inset-toggle" # 'i' for Inset
151 #  -: "Option-Command-I"             # Display an inspector window
152 #  -: "Command-J"                    # Scroll to a selection
153 \bind "C-k"                          "line-delete-forward"
154 #  -: "Command-M"                    # Minimize the active window to the Dock
155 #  -: "Option-Command-M"             # Minimize all windows of the active application to the Dock
156 \bind "C-m"                          "math-mode"
157 \bind "C-S-M"                        "math-display"
158 \bind "C-M-n"                        "command-sequence math-display; math-number-toggle;"
159 #  +: "Command-N"                    # Create a new document in the frontmost application
160 \bind "C-n"                          "buffer-new"
161 \bind "C-S-N"                        "buffer-new-template"
162 #  +: "Command-O"                    # Display a dialog for choosing a document to open in the frontmost application
163 \bind "C-o"                          "file-open"
164 #  +: "Command-P"                    # Display the Print dialog
165 \bind "C-p"                          "dialog-show print"
166 #  -: "Shift-Command-P"              # Display a dialog for specifying printing parameters (Page Setup)
167 \bind "C-S-P"                        "font-typewriter" # 'P' for Program
168 #  +: "Command-Q"                    # Quit the frontmost application
169 \bind "C-q"                          "lyx-quit"
170 \bind "C-r"                          "buffer-view"
171 #  +: "Command-S"                    # Save the active document
172 \bind "C-s"                          "buffer-write"
173 #  +: "Shift-Command-S"              # Display the Save As dialog
174 \bind "C-S-S"                        "buffer-write-as"
175 #  -: "Command-T"                    # Display the Fonts window
176 \bind "C-t"                          "buffer-view pdf"
177 \bind "C-M-t"                        "master-buffer-view pdf"
178 #  -: "Option-Command-T"             # Show or hide a toolbar
179 #  -: "Command-U"                    # Underline the selected text or turn underlining on or off
180 \bind "C-u"                          "font-underline"
181 #  +: "Command-V"                    # Paste the Clipboard contents at the insertion point
182 \bind "C-v"                          "paste"
183 \bind "C-S-v"                        "clipboard-paste"
184 #  -: "Option-Command-V"             # Apply the style of one object to the selected object (Paste Style)
185 #  -: "Option-Shift-Command-V"       # Apply the style of the surrounding text to the inserted object (Paste and Match Style)
186 #  -: "Control-Command-V"            # Apply formatting settings to the selected object (Paste Ruler Command)
187 \bind "C-M-v"                        "primary-selection-paste"
188 #  ?: "Command-W"                    # Close the frontmost window
189 \bind "C-w"                          "buffer-close" # should be "window-close"
190 #  +: "Shift-Command-W"              # Close a file and its associated windows
191 \bind "C-S-w"                        "buffer-close"
192 #  +: "Option-Command-W"             # Close all windows in the application without quitting it
193 \bind "C-A-w"                        "buffer-close-all"
194 #  +: "Command-X"                    # Remove the selection and store in the Clipboard
195 \bind "C-x"                          "cut"
196 \bind "M-x"                          "command-execute"
197 #  -: "Command-Z"                    # Undo previous command (some applications allow for multiple Undos)
198 \bind "C-z"                          "undo"
199 #  -: "Shift-Command-Z"              # Redo previous command (some applications allow for multiple Redos)
200 \bind "C-S-Z"                        "redo"
201 #  -: "Control-Right Arrow"          # Move focus to another value or cell within a view, such as a table
202 #  -: "Control-Left Arrow"           # Move focus to another value or cell within a view, such as a table
203 #  -: "Control-Down Arrow"           # Move focus to another value or cell within a view, such as a table
204 #  -: "Control-Up Arrow"             # Move focus to another value or cell within a view, such as a table
205 #  +: "Command-Right Arrow"          # Move the text insertion point to the end of the current line
206 \bind "C-Right"                      "line-end"
207 #  +: "Command-Left Arrow"           # Move the text insertion point to the beginning of the current line
208 \bind "C-Left"                       "line-begin"
209 #  +: "Command-Down Arrow"           # Move the text insertion point to the end of the document
210 \bind "C-Down"                       "buffer-end"
211 \bind "M-A-Down"                     "inset-end" 
212 #  +: "Command-Up Arrow"             # Move the text insertion point to the beginning of the document
213 \bind "C-Up"                         "buffer-begin"
214 \bind "M-A-Up"                       "inset-begin" 
215 #  +: "Shift-Command-Right Arrow"    # Select text between the insertion point and the end of the current line (*)
216 \bind "S-C-Right"                    "line-end-select"
217 #  +: "Shift-Command-Left Arrow"     # Select text between the insertion point and the beginning of the current line (*)
218 \bind "S-C-Left"                     "line-begin-select"
219 #  +: "Shift-Right Arrow"            # Extend text selection one character to the right (*)
220 \bind "S-Right"                      "char-right-select"
221 #  +: "Shift-Left Arrow"             # Extend text selection one character to the left (*)
222 \bind "S-Left"                       "char-left-select"
223 #  +: "Shift-Command-Up Arrow"       # Select text between the insertion point and the beginning of the document (*)
224 \bind "S-C-Up"                       "buffer-begin-select"
225 #  +: "Shift-Command-Down Arrow"     # Select text between the insertion point and the end of the document (*)
226 \bind "S-C-Down"                     "buffer-end-select"
227 #  +: "Shift-Up Arrow"               # Extend text selection to the line above, to the nearest character boundary at the same horizontal location (*)
228 \bind "S-Up"                         "up-select"
229 #  +: "Shift-Down Arrow"             # Extend text selection to the line below, to the nearest character boundary at the same horizontal location (*)
230 \bind "S-Down"                       "down-select"
231 #  +: "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 (*)
232 \bind "A-Right"                      "word-right"
233 \bind "S-A-Right"                    "word-right-select"
234 #  +: "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 (*)
235 \bind "A-Left"                       "word-left"
236 \bind "S-A-Left"                     "word-left-select"
237 #  +: "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 (*)
238 \bind "A-Down"                       "paragraph-down"
239 \bind "S-A-Down"                     "paragraph-down-select"
240 \bind "S-M-A-Down"                   "inset-end-select" 
241 #  +: "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 (*)
242 \bind "A-Up"                         "paragraph-up"
243 \bind "S-A-Up"                       "paragraph-up-select"
244 \bind "S-M-A-Up"                     "inset-begin-select" 
245 #  -: "Control-Space"                # Toggle between the current and previous input sources
246 #  -: "Option-Control-Space"         # Toggle through all enabled input sources
247 #  +: "Option-Command-esc"           # Force Quit
248
249 # Additional commands
250
251 \bind "C-S-O"                        "font-strikeout"
252 \bind "C-S-T"                        "buffer-update pdf" # (pdflatex; was "ps")
253 \bind "C-S-R"                        "buffer-update"
254 \bind "C-M-S-T"                      "master-buffer-update pdf"
255 \bind "C-M-S-D"                      "master-buffer-update dvi"
256
257 \bind "C-S-E"                        "changes-track" # it's what MS Word uses
258 \bind "~S-M-quotedbl"                "quote-insert single"
259 \bind "~S-C-quotedbl"                "self-insert \""
260 \bind "C-S-underscore"               "command-alternatives math-macro-fold;specialchar-insert hyphenation"
261 \bind "C-M-minus"                    "specialchar-insert nobreakdash"
262 \bind "M-C-Right"                    "depth-increment"
263 \bind "M-C-Left"                     "depth-decrement"
264 \bind "C-S-L"                        "specialchar-insert ligature-break"
265 \bind "C-l"                          "ert-insert"               # 'l' for LaTeX
266 \bind "C-S-I"                        "info-insert"
267
268 #bind "F1"                           "help"         # Not yet implemented!
269 #bind "C-F1"                         "help-context" # Not yet implemented!
270 \bind "F2"                           "buffer-write"
271 \bind "C-F4"                         "buffer-close"
272 \bind "C-A-Up"                       "scroll line up"
273 \bind "C-A-Down"                     "scroll line down"
274 \bind "C-A-Prior"                    "scroll page up"
275 \bind "C-A-Next"                     "scroll page down"
276 \bind "F7"                           "dialog-show spellchecker"
277 \bind "S-F7"                         "thesaurus-entry"
278
279 \bind "C-M-o"                        "dialog-show toc"
280
281 #
282 # Additional Motion group
283 #
284
285 \bind "C-~S-greater"                 "label-goto"
286 \bind "C-~S-less"                            "bookmark-goto 0"
287
288 #
289 # Additional Motion + select group
290 #
291
292 \bind "S-Prior"                      "screen-up-select"
293 \bind "S-Next"                       "screen-down-select"
294 \bind "C-Insert"                     "copy"
295 \bind "S-Insert"                     "paste"
296 \bind "S-Delete"                     "cut"
297
298 # Numeric keypad (if Shift+KP_XXX does not switch the NumLock state)
299 \bind "S-KP_Right"                   "char-right-select"
300 \bind "S-KP_Left"                    "char-left-select"
301 \bind "S-KP_Up"                      "up-select"
302 \bind "S-KP_Down"                    "down-select"
303 \bind "S-M-KP_Right"                 "word-right-select"
304 \bind "S-M-KP_Left"                  "word-left-select"
305 \bind "S-M-KP_Up"                    "paragraph-up-select"
306 \bind "S-M-KP_Down"                  "paragraph-down-select"
307 \bind "S-KP_Home"                    "line-begin-select"
308 \bind "S-KP_End"                     "line-end-select"
309 \bind "S-KP_Prior"                   "screen-up-select"
310 \bind "S-KP_Next"                    "screen-down-select"
311 \bind "S-C-KP_Home"                  "buffer-begin-select"
312 \bind "S-C-KP_End"                   "buffer-end-select"
313 \bind "S-C-KP_Prior"                 "buffer-begin-select"
314 \bind "S-C-KP_Next"                  "buffer-end-select"
315 \bind "C-KP_Insert"                  "copy"
316 \bind "S-KP_Insert"                  "paste"
317 \bind "S-KP_Delete"                  "cut"
318
319 #
320 # bookmarks
321 #
322
323 \bind "C-~S-1"                       "bookmark-goto 1"
324 \bind "C-~S-2"                       "bookmark-goto 2"
325 \bind "C-~S-3"                       "bookmark-goto 3"
326 \bind "C-~S-4"                       "bookmark-goto 4"
327 \bind "C-~S-5"                       "bookmark-goto 5"
328 \bind "C-~S-6"                       "bookmark-goto 6"
329 \bind "C-~S-7"                       "bookmark-goto 7"
330 \bind "C-~S-8"                       "bookmark-goto 8"
331 \bind "C-~S-9"                       "bookmark-goto 9"
332 \bind "C-M-~S-1"                     "bookmark-save 1"
333 \bind "C-M-~S-2"                     "bookmark-save 2"
334 \bind "C-M-~S-3"                     "bookmark-save 3"
335 \bind "C-M-~S-4"                     "bookmark-save 4"
336 \bind "C-M-~S-5"                     "bookmark-save 5"
337 \bind "C-M-~S-6"                     "bookmark-save 6"
338 \bind "C-M-~S-7"                     "bookmark-save 7"
339 \bind "C-M-~S-8"                     "bookmark-save 8"
340 \bind "C-M-~S-9"                     "bookmark-save 9"
341
342 #
343 # Additional Edit group
344 #
345
346 \bind "A-Delete"                     "word-delete-forward"
347 \bind "A-BackSpace"                  "word-delete-backward"
348 \bind "M-Return"                     "break-paragraph inverse"
349 \bind "C-Return"                     "newline-insert newline"
350 \bind "C-S-Return"                   "newline-insert linebreak"
351 \bind "A-space"                      "command-alternatives space-insert protected ; math-space"
352 \bind "nobreakspace"                 "space-insert protected"
353 \bind "C-A-space"                    "space-insert normal"
354 \bind "S-A-space"                    "space-insert thin"
355 \bind "C-~S-slash"                   "specialchar-insert slash"
356 \bind "C-period"                     "specialchar-insert end-of-sentence"
357 \bind "M-period"                     "specialchar-insert dots"
358 \bind "Escape"                       "cancel"
359 \bind "C-M-Up"                       "paragraph-move-up"
360 \bind "C-M-Down"                     "paragraph-move-down"
361 #\bind "F9"                          "meta-prefix"
362
363 # Include menu and math bindings
364
365 \bind_file menus.bind
366 \bind_file math.bind
367 \bind_file latinkeys.bind
368 \bind_file cyrkeys.bind
369 \bind_file greekkeys.bind