mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
Update lib/client/editor.js
This commit is contained in:
parent
56d99211d7
commit
c86b60f183
1 changed files with 9 additions and 4 deletions
|
|
@ -188,7 +188,7 @@ CloudCommander.Editor.Keys = (function(){
|
|||
/* если клавиши можно обрабатывать */
|
||||
if(CloudCommander.keyBinded){
|
||||
/* if f4 pressed */
|
||||
if(event.keyCode===115){
|
||||
if(event.keyCode === CloudCommander.KEY.F4){
|
||||
CloudCommander.Editor.CodeMirror.show();
|
||||
}
|
||||
}
|
||||
|
|
@ -196,8 +196,13 @@ CloudCommander.Editor.Keys = (function(){
|
|||
|
||||
/* добавляем обработчик клавишь */
|
||||
if (document.addEventListener)
|
||||
document.addEventListener('keydown', key_event,false);
|
||||
|
||||
document.addEventListener('keydown', key_event,false);
|
||||
|
||||
else
|
||||
document.onkeypress=key_event;
|
||||
document.onkeydown = function(){
|
||||
if(typeof document.onkeypress === 'function')
|
||||
document.onkeydown();
|
||||
|
||||
key_event();
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue