From 4da252c441de37ade63408424fd0ec54633e448f Mon Sep 17 00:00:00 2001 From: coderaiaser Date: Tue, 17 Jul 2012 07:05:14 -0700 Subject: [PATCH] added output for pressed keys --- lib/client/editor.js | 12 ++++++------ lib/client/keyBinding.js | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/client/editor.js b/lib/client/editor.js index fe191531..cec1d745 100644 --- a/lib/client/editor.js +++ b/lib/client/editor.js @@ -1,5 +1,5 @@ var CloudCommander; -CloudCommander.Editor = { CloudMirror: undefined }; +CloudCommander.Editor = {}; CloudCommander.Editor.CloudMirror = { load: (function(){ CloudCommander.jsload('http://codemirror.net/lib/codemirror.js', load_all(this)); @@ -52,12 +52,12 @@ CloudCommander.Editor.CloudMirror = { load: (function(){ }); } - } - CloudCommander.jsload('http://codemirror.net/mode/xml/xml.js', lShowEditor_f) - } + }; + CloudCommander.jsload('http://codemirror.net/mode/xml/xml.js', lShowEditor_f); + }; } }), - show : (function(){ + show : (function(){ /* removing keyBinding if set */ CloudCommander.keyBinded = false; left.className = 'panel hidden'; @@ -67,7 +67,7 @@ CloudCommander.Editor.CloudMirror = { load: (function(){ - hide :(function() { + hide :(function() { CloudCommander.keyBinded = true; CloudEditor.className='hidden'; left.className = 'panel'; diff --git a/lib/client/keyBinding.js b/lib/client/keyBinding.js index a441671f..06fcc140 100644 --- a/lib/client/keyBinding.js +++ b/lib/client/keyBinding.js @@ -26,6 +26,7 @@ CloudCommander.keyBinding=(function(){ * мы были на левой и * наоборот */ + console.log(event.keyCode); if(event.keyCode===9){ console.log('Tab pressed'); try{