summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorWu Cheng-Han2016-09-18 16:30:08 +0800
committerWu Cheng-Han2016-09-18 16:30:08 +0800
commit9d71adc05c93577d64f47180e3429bf3cd9a7be0 (patch)
tree0a678eb2435d63de7f7d2423330450672a86508c /public/js
parentb708a728739e96849f9882dfce6bae9fa0b2851b (diff)
Add support of shortcut keys for changeMode
Diffstat (limited to 'public/js')
-rw-r--r--public/js/index.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index dbedd66c..d9e4955f 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -805,6 +805,18 @@ $(document).ready(function () {
});
//tooltip
$('[data-toggle="tooltip"]').tooltip();
+ // shortcuts
+ // allow on all tags
+ key.filter = function (e) { return true; };
+ key('ctrl+alt+e', function (e) {
+ changeMode(modeType.edit);
+ });
+ key('ctrl+alt+v', function (e) {
+ changeMode(modeType.view);
+ });
+ key('ctrl+alt+b', function (e) {
+ changeMode(modeType.both);
+ });
});
//when page resize
$(window).resize(function () {