Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
16 changes: 12 additions & 4 deletions src/command/KeyMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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("-");
Expand Down
1 change: 0 additions & 1 deletion src/command/Menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@
<li class="dropdown">
<a href="#" class="dropdown-toggle">Edit</a>
<ul class="dropdown-menu">
<!-- disabled until the menu items are connected to the commands. Keyboard shortcuts work via CodeMirror
<li><a href="#" id="menu-edit-undo">Undo</a></li>
<li><a href="#" id="menu-edit-redo">Redo</a></li>
<li><hr class="divider"></li>
<li><a href="#" id="menu-edit-cut">Cut</a></li>
<li><a href="#" id="menu-edit-copy">Copy</a></li>
<li><a href="#" id="menu-edit-paste">Paste</a></li>
<li><a href="#" id="menu-edit-paste">Paste</a></li>
-->
<li><a href="#" id="menu-edit-select-all">Select All</a></li>
<li><hr class="divider"></li>
<li><a href="#" id="menu-edit-find">Find</a></li>
Expand Down