Commit 698ab9ed authored by campaign's avatar campaign

添加保存快捷键

parent 7105d0f2
......@@ -386,4 +386,23 @@ $( function () {
}
window.km.on( 'contentchange', checkAutoSave );
} );
\ No newline at end of file
//添加快捷键
$(document.body).keydown(function(e){
var keyCode = e.keyCode || e.which;
//添加快捷键
if((e.ctrlKey || e.metaKey)){
switch (keyCode){
//保存
case KM.keymap.s :
saveThisFile();
e.preventDefault();
break;
}
}
})
} );
......@@ -40,5 +40,7 @@ var keymap = KityMinder.keymap = {
'y':89,
//粘贴
'v' : 86,
'x' : 88
'x' : 88,
's' : 83
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment