diff --git a/src/brackets.js b/src/brackets.js index 7dcb5db65ee..9127095f093 100644 --- a/src/brackets.js +++ b/src/brackets.js @@ -163,9 +163,11 @@ define(function (require, exports, module) { {"Ctrl-O": Commands.FILE_OPEN}, {"Ctrl-S": Commands.FILE_SAVE}, {"Ctrl-W": Commands.FILE_CLOSE}, + {"Ctrl-Alt-P": Commands.FILE_LIVE_FILE_PREVIEW}, {"Ctrl-Q": Commands.FILE_QUIT}, - // EDIT + // EDIT + // disabled until the menu items are connected to the commands. Keyboard shortcuts work via CodeMirror //{"Ctrl-Z": Commands.EDIT_UNDO}, //{"Ctrl-Y": Commands.EDIT_REDO}, //{"Ctrl-X": Commands.EDIT_CUT}, diff --git a/src/command/KeyMap.js b/src/command/KeyMap.js index c40d52468f6..955fe247ed7 100644 --- a/src/command/KeyMap.js +++ b/src/command/KeyMap.js @@ -3,7 +3,7 @@ */ /*jslint vars: true, plusplus: true, devel: true, browser: true, nomen: true, indent: 4, maxerr: 50 */ -/*global define: false */ +/*global define: false, brackets */ define(function (require, exports, module) { 'use strict'; @@ -24,15 +24,23 @@ define(function (require, exports, module) { } var keyDescriptor = []; - if (hasCtrl) { - keyDescriptor.push("Ctrl"); - } + if (hasAlt) { keyDescriptor.push("Alt"); } if (hasShift) { keyDescriptor.push("Shift"); } + + if (hasCtrl) { + // Windows display Ctrl first, Mac displays Command symbol last + if (brackets.platform === "win") { + keyDescriptor.unshift("Ctrl"); + } else { + keyDescriptor.push("Ctrl"); + } + } + keyDescriptor.push(key); return keyDescriptor.join("-"); diff --git a/src/command/Menus.js b/src/command/Menus.js index 32c0a3563fe..be183360b45 100644 --- a/src/command/Menus.js +++ b/src/command/Menus.js @@ -62,7 +62,6 @@ define(function (require, exports, module) { "menu-experimental-close-all-live-browsers": Commands.DEBUG_CLOSE_ALL_LIVE_BROWSERS }; - var _codeMirrorInternal = [Commands.EDIT_SELECT_ALL, Commands.EDIT_UNDO]; function init() { var cmdToIdMap = {}; // used to swap the values and keys for fast look up diff --git a/src/index.html b/src/index.html index 65d2991646e..d6b4d1289ab 100644 --- a/src/index.html +++ b/src/index.html @@ -101,12 +101,14 @@