browser-sets.inc (19299B)
1 # -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- 2 # This Source Code Form is subject to the terms of the Mozilla Public 3 # License, v. 2.0. If a copy of the MPL was not distributed with this 4 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 5 6 #ifdef XP_UNIX 7 #ifndef XP_MACOSX 8 #define XP_GNOME 1 9 #endif 10 #endif 11 12 <stringbundleset id="stringbundleset"> 13 <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/> 14 </stringbundleset> 15 16 <!-- The event listeners are defined by _initCommandSet in browser-init.js --> 17 <commandset id="mainCommandSet"> 18 <command id="cmd_newNavigator" /> 19 <command id="cmd_handleBackspace" /> 20 <command id="cmd_handleShiftBackspace" /> 21 22 <command id="cmd_newNavigatorTab" /> 23 <command id="cmd_newNavigatorTabNoEvent" /> 24 <command id="Browser:OpenFile" /> 25 <command id="Browser:SavePage" /> 26 27 <command id="Browser:SendLink" /> 28 29 <command id="cmd_pageSetup" /> 30 <command id="cmd_print" /> 31 <command id="cmd_printPreviewToggle" /> 32 <command id="cmd_file_importFromAnotherBrowser" /> 33 <command id="cmd_help_importFromAnotherBrowser" /> 34 <command id="cmd_close" /> 35 <command id="cmd_closeWindow" /> 36 <command id="cmd_minimizeWindow" /> 37 <command id="cmd_maximizeWindow" /> 38 <command id="cmd_restoreWindow" /> 39 <command id="cmd_toggleMute" /> 40 <command id="cmd_CustomizeToolbars" /> 41 <command id="cmd_toggleOfflineStatus" /> 42 <command id="cmd_quitApplication" /> 43 44 <command id="View:AboutProcesses" /> 45 <command id="View:PageSource" /> 46 <command id="View:PageInfo" /> 47 <command id="View:FullScreen" /> 48 <command id="View:ReaderView" /> 49 <command id="View:PictureInPicture" /> 50 <command id="cmd_find" /> 51 <command id="cmd_findAgain" /> 52 <command id="cmd_findPrevious" /> 53 #ifdef XP_MACOSX 54 <command id="cmd_findSelection" /> 55 #endif 56 <command id="cmd_reportBrokenSite"/> 57 <command id="cmd_translate" /> 58 <!-- work-around bug 392512 --> 59 <command id="Browser:AddBookmarkAs" /> 60 <command id="Browser:SearchBookmarks" /> 61 <command id="Browser:BookmarkAllTabs"/> 62 <command id="Browser:Back" disabled="true" /> 63 <command id="Browser:BackOrBackDuplicate" disabled="true"> 64 <observes element="Browser:Back" attribute="disabled"/> 65 </command> 66 <command id="Browser:Forward" disabled="true" /> 67 <command id="Browser:ForwardOrForwardDuplicate" disabled="true"> 68 <observes element="Browser:Forward" attribute="disabled"/> 69 </command> 70 <command id="Browser:Stop" disabled="true" /> 71 <command id="Browser:Reload" disabled="true" /> 72 <command id="Browser:ReloadOrDuplicate" disabled="true"> 73 <observes element="Browser:Reload" attribute="disabled"/> 74 </command> 75 <command id="Browser:ReloadSkipCache" disabled="true"> 76 <observes element="Browser:Reload" attribute="disabled"/> 77 </command> 78 <command id="Profiles:CreateProfile" /> 79 <command id="Profiles:ManageProfiles" /> 80 <command id="Profiles:LaunchProfile" /> 81 <command id="Profiles:MoveTabsToProfile" /> 82 <command id="Browser:NextTab" /> 83 <command id="Browser:PrevTab" /> 84 <command id="Browser:ShowAllTabs" /> 85 <command id="cmd_fullZoomReduce" /> 86 <command id="cmd_fullZoomEnlarge" /> 87 <command id="cmd_fullZoomReset" /> 88 <command id="cmd_fullZoomToggle" /> 89 <command id="cmd_gestureRotateLeft" /> 90 <command id="cmd_gestureRotateRight" /> 91 <command id="cmd_gestureRotateEnd" /> 92 <command id="Browser:OpenLocation" /> 93 <command id="Browser:RestoreLastSession" disabled="true"/> 94 <command id="Browser:NewUserContextTab" /> 95 <command id="Browser:OpenAboutContainers" /> 96 <command id="Tools:Search" /> 97 <command id="Tools:Downloads" /> 98 <command id="Tools:Addons" /> 99 <command id="cmd_openUnifiedExtensionsPanel" /> 100 <command id="Tools:AIWindow" /> 101 <command id="Tools:ChatsHistory" /> 102 <command id="Tools:ClassicWindow" /> 103 <command id="Tools:Sanitize" /> 104 <command id="Tools:PrivateBrowsing" /> 105 <command id="Browser:Screenshot" /> 106 <command id="History:UndoCloseTab" data-l10n-args='{"tabCount": 1}' /> 107 <command id="History:UndoCloseWindow" /> 108 <command id="History:RestoreLastClosedTabOrWindowOrSession" /> 109 <command id="History:SearchHistory" /> 110 111 <command id="wrCaptureCmd" disabled="true"/> 112 <command id="wrToggleCaptureSequenceCmd" disabled="true"/> 113 #ifdef NIGHTLY_BUILD 114 <command id="windowRecordingCmd" /> 115 #endif 116 #ifdef XP_MACOSX 117 <command id="zoomWindow" data-l10n-id="window-zoom-command" /> 118 #endif 119 120 <command id="cmd_newIdentity" /> 121 <command id="cmd_newCircuit" /> 122 </commandset> 123 #include ../../components/places/content/placesCommands.inc.xhtml 124 <commandset id="splitViewCommands"> 125 <command id="splitViewCmd_separateTabs"/> 126 <command id="splitViewCmd_reverseTabs"/> 127 <command id="splitViewCmd_closeTabs"/> 128 </commandset> 129 130 <keyset id="mainKeyset"> 131 <key id="key_newNavigator" 132 data-l10n-id="window-new-shortcut" 133 command="cmd_newNavigator" 134 modifiers="accel" reserved="true"/> 135 <key id="key_newNavigatorTab" data-l10n-id="tab-new-shortcut" modifiers="accel" 136 command="cmd_newNavigatorTabNoEvent" reserved="true"/> 137 <key id="focusURLBar" data-l10n-id="location-open-shortcut" command="Browser:OpenLocation" 138 modifiers="accel"/> 139 #ifndef XP_MACOSX 140 <key id="focusURLBar2" data-l10n-id="location-open-shortcut-alt" command="Browser:OpenLocation" 141 modifiers="alt"/> 142 #endif 143 144 # 145 # Search Command Key Logic works like this: 146 # 147 # Unix: Ctrl+K (cross platform binding) 148 # Ctrl+J (in case of emacs Ctrl-K conflict) 149 # Mac: Cmd+K (cross platform binding) 150 # Cmd+Opt+F (platform convention) 151 # Win: Ctrl+K (cross platform binding) 152 # Ctrl+E (IE compat) 153 # 154 # We support Ctrl+K on all platforms now and advertise it in the menu since it is 155 # our standard - it is a "safe" choice since it is near no harmful keys like "W" as 156 # "E" is. People mourning the loss of Ctrl+K for emacs compat can switch their GTK 157 # system setting to use emacs emulation, and we should respect it. Focus-Search-Box 158 # is a fundamental keybinding and we are maintaining a XP binding so that it is easy 159 # for people to switch to Linux. 160 # 161 <key id="key_search" data-l10n-id="search-focus-shortcut" command="Tools:Search" modifiers="accel"/> 162 <key id="key_search2" 163 #ifdef XP_MACOSX 164 data-l10n-id="find-shortcut" 165 modifiers="accel,alt" 166 #else 167 data-l10n-id="search-focus-shortcut-alt" 168 modifiers="accel" 169 #endif 170 command="Tools:Search"/> 171 <key id="key_openDownloads" 172 data-l10n-id="downloads-shortcut" 173 #ifdef XP_GNOME 174 modifiers="accel,shift" 175 #else 176 modifiers="accel" 177 #endif 178 command="Tools:Downloads"/> 179 <key id="key_openAddons" data-l10n-id="addons-shortcut" command="Tools:Addons" modifiers="accel,shift"/> 180 <key id="openFileKb" data-l10n-id="file-open-shortcut" command="Browser:OpenFile" modifiers="accel"/> 181 <key id="key_savePage" data-l10n-id="save-page-shortcut" command="Browser:SavePage" modifiers="accel"/> 182 <key id="printKb" data-l10n-id="print-shortcut" command="cmd_print" modifiers="accel"/> 183 <key id="key_close" data-l10n-id="close-shortcut" command="cmd_close" modifiers="accel" reserved="true"/> 184 <key id="key_closeWindow" data-l10n-id="close-shortcut" command="cmd_closeWindow" modifiers="accel,shift" reserved="true"/> 185 <key id="key_toggleMute" data-l10n-id="mute-toggle-shortcut" command="cmd_toggleMute" modifiers="control"/> 186 <key id="key_undo" 187 data-l10n-id="text-action-undo-shortcut" 188 modifiers="accel" 189 internal="true"/> 190 <key id="key_redo" 191 #ifdef XP_UNIX 192 data-l10n-id="text-action-undo-shortcut" 193 modifiers="accel,shift" 194 #else 195 data-l10n-id="text-action-redo-shortcut" 196 modifiers="accel" 197 #endif 198 internal="true"/> 199 <key id="key_cut" 200 data-l10n-id="text-action-cut-shortcut" 201 modifiers="accel" 202 internal="true"/> 203 <key id="key_copy" 204 data-l10n-id="text-action-copy-shortcut" 205 modifiers="accel" 206 internal="true"/> 207 <key id="key_paste" 208 data-l10n-id="text-action-paste-shortcut" 209 modifiers="accel" 210 internal="true"/> 211 <key id="key_delete" keycode="VK_DELETE" command="cmd_delete" reserved="false"/> 212 <key id="key_selectAll" data-l10n-id="text-action-select-all-shortcut" modifiers="accel" internal="true"/> 213 214 <key keycode="VK_BACK" command="cmd_handleBackspace" reserved="false"/> 215 <key keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift" reserved="false"/> 216 #ifndef XP_MACOSX 217 <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="alt"/> 218 <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="alt"/> 219 #else 220 <key id="goBackKb" keycode="VK_LEFT" command="Browser:Back" modifiers="accel" /> 221 <key id="goForwardKb" keycode="VK_RIGHT" command="Browser:Forward" modifiers="accel" /> 222 #endif 223 #ifdef XP_UNIX 224 <key id="goBackKb2" data-l10n-id="nav-back-shortcut-alt" command="Browser:Back" modifiers="accel"/> 225 <key id="goForwardKb2" data-l10n-id="nav-fwd-shortcut-alt" command="Browser:Forward" modifiers="accel"/> 226 #endif 227 <key id="goHome" keycode="VK_HOME" modifiers="alt"/> 228 <key id="key_reload2" keycode="VK_F5" command="Browser:Reload"/> 229 #ifndef XP_MACOSX 230 <key id="showAllHistoryKb" data-l10n-id="history-show-all-shortcut" command="Browser:ShowAllHistory" modifiers="accel,shift"/> 231 <key id="key_reload_skip_cache2" keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/> 232 <key id="key_enterFullScreen" keycode="VK_F11" command="View:FullScreen"/> 233 <key id="key_exitFullScreen" keycode="VK_F11" command="View:FullScreen" reserved="true" disabled="true"/> 234 #else 235 <key id="showAllHistoryKb" data-l10n-id="history-show-all-shortcut-mac" command="Browser:ShowAllHistory" modifiers="accel"/> 236 <key id="key_enterFullScreen" data-l10n-id="full-screen-shortcut" command="View:FullScreen" modifiers="accel,control"/> 237 <key id="key_enterFullScreen_old" data-l10n-id="full-screen-shortcut" command="View:FullScreen" modifiers="accel,shift"/> 238 <key id="key_enterFullScreen_compat" keycode="VK_F11" command="View:FullScreen"/> 239 <key id="key_exitFullScreen" data-l10n-id="full-screen-shortcut" command="View:FullScreen" modifiers="accel,control" reserved="true" disabled="true"/> 240 <key id="key_exitFullScreen_old" data-l10n-id="full-screen-shortcut" command="View:FullScreen" modifiers="accel,shift" reserved="true" disabled="true"/> 241 <key id="key_exitFullScreen_compat" keycode="VK_F11" command="View:FullScreen" reserved="true" disabled="true"/> 242 #endif 243 <key id="key_toggleReaderMode" 244 command="View:ReaderView" 245 #ifdef XP_WIN 246 data-l10n-id="reader-mode-toggle-shortcut-windows" 247 #else 248 data-l10n-id="reader-mode-toggle-shortcut-other" 249 modifiers="accel,alt" 250 #endif 251 disabled="true"/> 252 253 #ifndef XP_MACOSX 254 <key id="key_togglePictureInPicture" data-l10n-id="picture-in-picture-toggle-shortcut" command="View:PictureInPicture" modifiers="accel,shift"/> 255 <key data-l10n-id="picture-in-picture-toggle-shortcut-alt" command="View:PictureInPicture" modifiers="accel,shift"/> 256 #else 257 <key id="key_togglePictureInPicture" data-l10n-id="picture-in-picture-toggle-shortcut-mac" command="View:PictureInPicture" modifiers="accel,alt,shift"/> 258 <key data-l10n-id="picture-in-picture-toggle-shortcut-mac-alt" command="View:PictureInPicture" modifiers="accel,alt,shift"/> 259 #endif 260 261 <key data-l10n-id="nav-reload-shortcut" command="Browser:Reload" modifiers="accel" id="key_reload"/> 262 <key data-l10n-id="nav-reload-shortcut" command="Browser:ReloadSkipCache" modifiers="accel,shift" id="key_reload_skip_cache"/> 263 <key id="key_aboutProcesses" command="View:AboutProcesses" keycode="VK_ESCAPE" modifiers="shift"/> 264 <key id="key_viewSource" data-l10n-id="page-source-shortcut" command="View:PageSource" modifiers="accel"/> 265 #ifdef XP_MACOSX 266 <key id="key_viewSourceSafari" data-l10n-id="page-source-shortcut-safari" command="View:PageSource" modifiers="accel,alt"/> 267 #endif 268 <key id="key_viewInfo" data-l10n-id="page-info-shortcut" command="View:PageInfo" modifiers="accel"/> 269 <key id="key_find" data-l10n-id="find-shortcut" command="cmd_find" modifiers="accel"/> 270 <key id="key_findAgain" data-l10n-id="search-find-again-shortcut" command="cmd_findAgain" modifiers="accel"/> 271 <key id="key_findPrevious" data-l10n-id="search-find-again-shortcut" command="cmd_findPrevious" modifiers="accel,shift"/> 272 #ifdef XP_MACOSX 273 <key id="key_findSelection" data-l10n-id="search-find-selection-shortcut" command="cmd_findSelection" modifiers="accel"/> 274 #endif 275 <key data-l10n-id="search-find-again-shortcut-alt" command="cmd_findAgain"/> 276 <key data-l10n-id="search-find-again-shortcut-alt" command="cmd_findPrevious" modifiers="shift"/> 277 278 <key id="addBookmarkAsKb" data-l10n-id="bookmark-this-page-shortcut" command="Browser:AddBookmarkAs" modifiers="accel"/> 279 <key id="bookmarkAllTabsKb" 280 data-l10n-id="bookmark-this-page-shortcut" 281 modifiers="accel,shift"/> 282 <key id="manBookmarkKb" data-l10n-id="bookmark-show-library-shortcut" command="Browser:ShowAllBookmarks" modifiers="accel,shift"/> 283 <key id="viewBookmarksSidebarKb" 284 data-l10n-id="bookmark-show-sidebar-shortcut" 285 modifiers="accel"/> 286 <key id="viewBookmarksToolbarKb" 287 data-l10n-id="bookmark-show-toolbar-shortcut" 288 modifiers="accel,shift"/> 289 290 <key id="key_stop" keycode="VK_ESCAPE" command="Browser:Stop"/> 291 292 #ifdef XP_MACOSX 293 <key id="key_stop_mac" modifiers="accel" data-l10n-id="nav-stop-shortcut" command="Browser:Stop"/> 294 #endif 295 296 <key id="viewGenaiChatSidebarKb" 297 data-l10n-id="ai-chatbot-sidebar-shortcut" 298 #ifdef XP_MACOSX 299 modifiers="control" 300 #else 301 modifiers="accel,alt" 302 #endif 303 /> 304 <key id="toggleSidebarKb" 305 data-l10n-id="toggle-sidebar-shortcut" 306 #ifdef XP_MACOSX 307 modifiers="control" 308 #else 309 modifiers="control,alt" 310 #endif 311 /> 312 <key id="key_gotoHistory" 313 data-l10n-id="history-sidebar-shortcut" 314 #ifdef XP_MACOSX 315 modifiers="accel,shift" 316 #else 317 modifiers="accel" 318 #endif 319 /> 320 321 <key id="key_fullZoomReduce" data-l10n-id="full-zoom-reduce-shortcut" command="cmd_fullZoomReduce" modifiers="accel"/> 322 <key data-l10n-id="full-zoom-reduce-shortcut-alt-a" command="cmd_fullZoomReduce" modifiers="accel"/> 323 <key data-l10n-id="full-zoom-reduce-shortcut-alt-b" command="cmd_fullZoomReduce" modifiers="accel"/> 324 <key id="key_fullZoomEnlarge" data-l10n-id="full-zoom-enlarge-shortcut" command="cmd_fullZoomEnlarge" modifiers="accel"/> 325 <key data-l10n-id="full-zoom-enlarge-shortcut-alt" command="cmd_fullZoomEnlarge" modifiers="accel"/> 326 <key data-l10n-id="full-zoom-enlarge-shortcut-alt2" command="cmd_fullZoomEnlarge" modifiers="accel"/> 327 <key id="key_fullZoomReset" data-l10n-id="full-zoom-reset-shortcut" command="cmd_fullZoomReset" modifiers="accel"/> 328 <key data-l10n-id="full-zoom-reset-shortcut-alt" command="cmd_fullZoomReset" modifiers="accel"/> 329 330 <key id="key_showAllTabs" keycode="VK_TAB" modifiers="control,shift"/> 331 332 <key id="key_switchTextDirection" data-l10n-id="bidi-switch-direction-shortcut" command="cmd_switchTextDirection" modifiers="accel,shift" /> 333 334 <key id="key_privatebrowsing" command="Tools:PrivateBrowsing" data-l10n-id="private-browsing-shortcut" 335 modifiers="accel,shift" reserved="true"/> 336 <key id="key_screenshot" data-l10n-id="screenshot-shortcut" command="Browser:Screenshot" modifiers="accel,shift"/> 337 <key id="key_sanitize" command="Tools:Sanitize" keycode="VK_DELETE" modifiers="accel,shift"/> 338 #ifdef XP_MACOSX 339 <key id="key_sanitize_mac" command="Tools:Sanitize" keycode="VK_BACK" modifiers="accel,shift"/> 340 #endif 341 <key id="key_quitApplication" data-l10n-id="quit-app-shortcut" 342 #ifdef XP_WIN 343 modifiers="accel,shift" 344 #else 345 modifiers="accel" 346 #endif 347 # On OS X, dark voodoo magic invokes the quit code for this key. 348 # So we're not adding the attribute on OSX because of backwards/add-on compat. 349 # See bug 1369909 for background on this. 350 #ifdef XP_MACOSX 351 internal="true" 352 #else 353 command="cmd_quitApplication" 354 #endif 355 reserved="true"/> 356 357 <key id="key_restoreLastClosedTabOrWindowOrSession" command="History:RestoreLastClosedTabOrWindowOrSession" data-l10n-id="tab-new-shortcut" modifiers="accel,shift"/> 358 <key id="key_undoCloseWindow" command="History:UndoCloseWindow" data-l10n-id="window-new-shortcut" modifiers="accel,shift"/> 359 360 #ifdef XP_GNOME 361 #define NUM_SELECT_TAB_MODIFIER alt 362 #else 363 #define NUM_SELECT_TAB_MODIFIER accel 364 #endif 365 366 #expand <key id="key_selectTab1" key="1" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 367 #expand <key id="key_selectTab2" key="2" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 368 #expand <key id="key_selectTab3" key="3" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 369 #expand <key id="key_selectTab4" key="4" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 370 #expand <key id="key_selectTab5" key="5" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 371 #expand <key id="key_selectTab6" key="6" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 372 #expand <key id="key_selectTab7" key="7" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 373 #expand <key id="key_selectTab8" key="8" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 374 #expand <key id="key_selectLastTab" key="9" modifiers="__NUM_SELECT_TAB_MODIFIER__"/> 375 376 <key id="key_wrCaptureCmd" 377 #ifdef XP_MACOSX 378 key="3" modifiers="control,shift" 379 #else 380 key="#" modifiers="control" 381 #endif 382 command="wrCaptureCmd"/> 383 <key id="key_wrToggleCaptureSequenceCmd" 384 #ifdef XP_MACOSX 385 key="6" modifiers="control,shift" 386 #else 387 key="^" modifiers="control" 388 #endif 389 command="wrToggleCaptureSequenceCmd"/> 390 #ifdef NIGHTLY_BUILD 391 <key id="key_windowRecordingCmd" 392 #ifdef XP_MACOSX 393 key="4" modifiers="control,shift" 394 #else 395 key="$" modifiers="control" 396 #endif 397 command="windowRecordingCmd"/> 398 #endif 399 #ifdef XP_MACOSX 400 <key id="key_minimizeWindow" 401 command="cmd_minimizeWindow" 402 data-l10n-id="window-minimize-shortcut" 403 modifiers="accel" 404 internal="true"/> 405 <!-- These are used to build the Application menu --> 406 <key id="key_preferencesCmdMac" 407 data-l10n-id="preferences-shortcut" 408 modifiers="accel" 409 internal="true"/> 410 <key id="key_hideThisAppCmdMac" 411 data-l10n-id="hide-app-shortcut" 412 modifiers="accel" 413 internal="true"/> 414 <key id="key_hideOtherAppsCmdMac" 415 data-l10n-id="hide-other-apps-shortcut" 416 modifiers="accel,alt" 417 internal="true"/> 418 #endif 419 <key id="new-identity-key" modifiers="accel shift" key="U" command="cmd_newIdentity"/> 420 <key id="new-circuit-key" modifiers="accel shift" key="L" command="cmd_newCircuit"/> 421 </keyset>