diff options
| author | Hunternif | 2019-04-13 19:08:14 +0700 |
|---|---|---|
| committer | Hunternif | 2019-04-13 19:28:32 +0700 |
| commit | 55a7a96305dd9923f86f913ed4dea48b746685a1 (patch) | |
| tree | 0eac4a43aad495d6eccd7cb51399823754f04663 /client/js/views/post_main_view.js | |
| parent | 9a8f4e31046f197326cacbdd141b6abf07b2a078 (diff) | |
Add keyboard shortcuts for random post, focus tags input and save post
Diffstat (limited to 'client/js/views/post_main_view.js')
| -rw-r--r-- | client/js/views/post_main_view.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/js/views/post_main_view.js b/client/js/views/post_main_view.js index 55b57cc..7718dea 100644 --- a/client/js/views/post_main_view.js +++ b/client/js/views/post_main_view.js @@ -81,11 +81,22 @@ class PostMainView { }); keyboard.bind(['a', 'left'], showPreviousImage); keyboard.bind(['d', 'right'], showNextImage); + keyboard.bind('r', showRandomImage); keyboard.bind('del', (e) => { if (ctx.editMode) { this.sidebarControl._evtDeleteClick(e); } }); + keyboard.bind('t', () => { + if (ctx.editMode) { + this.sidebarControl.focusTagInput(); + } + }); + keyboard.bind(['command+s', 'ctrl+s'], (e) => { + if (ctx.editMode) { + this.sidebarControl.submit(e); + } + }); new Touch( postContainerNode, |