aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/code-editor-controller.js20
1 files changed, 14 insertions, 6 deletions
diff --git a/js/controllers/code-editor-controller.js b/js/controllers/code-editor-controller.js
index ab0521eb..d560e721 100644
--- a/js/controllers/code-editor-controller.js
+++ b/js/controllers/code-editor-controller.js
@@ -130,6 +130,10 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone
130 _showAutoComplete : { 130 _showAutoComplete : {
131 enumerable:false, 131 enumerable:false,
132 value:function(type, keyEvent){ 132 value:function(type, keyEvent){
133 var status=false;
134 if(((keyEvent.keyCode === 83) && (keyEvent.ctrlKey || keyEvent.metaKey))){
135 debugger;
136 }
133 switch(type){ 137 switch(type){
134 case "javascript": 138 case "javascript":
135 if((keyEvent.type === "keyup")//need seperate keycode set per mode 139 if((keyEvent.type === "keyup")//need seperate keycode set per mode
@@ -145,15 +149,19 @@ var CodeEditorController = exports.CodeEditorController = Montage.create(Compone
145 || (keyEvent.shiftKey && keyEvent.keyCode === 221)//close bracket } 149 || (keyEvent.shiftKey && keyEvent.keyCode === 221)//close bracket }
146 || (keyEvent.shiftKey && keyEvent.keyCode === 57)//open bracket ( 150 || (keyEvent.shiftKey && keyEvent.keyCode === 57)//open bracket (
147 || (keyEvent.shiftKey && keyEvent.keyCode === 48)//close bracket ) 151 || (keyEvent.shiftKey && keyEvent.keyCode === 48)//close bracket )
148 || ((keyEvent.ctrlKey || keyEvent.metaKey) && keyEvent.keyCode === 83)//ctrl+S 152 || ((keyEvent.keyCode === 83) && (keyEvent.ctrlKey || keyEvent.metaKey))//ctrl+S
149 || ((keyEvent.ctrlKey || keyEvent.metaKey) && keyEvent.keyCode === 90)//ctrl+z 153 || ((keyEvent.keyCode === 90) && (keyEvent.ctrlKey || keyEvent.metaKey))//ctrl+z
150 || ((keyEvent.ctrlKey || keyEvent.metaKey) && keyEvent.shiftKey && keyEvent.keyCode === 90)//ctrl+shift+z 154 || ((keyEvent.keyCode === 89) && (keyEvent.ctrlKey || keyEvent.metaKey))//ctrl+y
151 || ((keyEvent.ctrlKey || keyEvent.metaKey) && keyEvent.keyCode === 89)//ctrl+y
152 ) 155 )
153 ){return true;} 156 ){
157 status = true;
158 break;
159 }
154 default : 160 default :
155 return false; 161 status = false;
156 } 162 }
163
164 return status;
157 } 165 }
158 }, 166 },
159 167