diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/controllers/code-editor-controller.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/controllers/code-editor-controller.js b/js/controllers/code-editor-controller.js index 4a08aa32..7913cfc1 100644 --- a/js/controllers/code-editor-controller.js +++ b/js/controllers/code-editor-controller.js | |||
@@ -110,6 +110,17 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone | |||
110 | _codeCompletionKeyEventHandler:{ | 110 | _codeCompletionKeyEventHandler:{ |
111 | enumerable:false, | 111 | enumerable:false, |
112 | value: function(cm, keyEvent, documentType) { | 112 | value: function(cm, keyEvent, documentType) { |
113 | //comment shortkeys | ||
114 | if((keyEvent.metaKey || keyEvent.ctrlKey) && !keyEvent.shiftKey && keyEvent.keyCode === 191){//ctrl+/ | ||
115 | this.commentSelection(true); | ||
116 | return; | ||
117 | } | ||
118 | //uncomment shortkeys | ||
119 | if((keyEvent.metaKey || keyEvent.ctrlKey) && keyEvent.shiftKey && keyEvent.keyCode === 191){//ctrl+shift+/ | ||
120 | this.commentSelection(false); | ||
121 | return; | ||
122 | } | ||
123 | |||
113 | //===manually triggered code completion | 124 | //===manually triggered code completion |
114 | if((this.automaticCodeComplete === false)){ | 125 | if((this.automaticCodeComplete === false)){ |
115 | if(keyEvent.ctrlKey && keyEvent.keyCode === 32){//Ctrl+Space | 126 | if(keyEvent.ctrlKey && keyEvent.keyCode === 32){//Ctrl+Space |