Skip to content

Commit e339354

Browse files
committed
keyboard shortcut to close article
1 parent 4b3a278 commit e339354

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/assets/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ <h1><b>{{ itemSelectedDetails.title || 'untitled' }}</b></h1>
427427
<tr><td colspan=2>&nbsp;</td></tr>
428428
<tr><td><kbd>j</kbd> <kbd>k</kbd></td> <td>next / prev article</td></tr>
429429
<tr><td><kbd>l</kbd> <kbd>h</kbd></td> <td>next / prev feed</td></tr>
430+
<tr><td><kbd>q</kbd></td> <td>close article</td></tr>
430431

431432
<tr><td colspan=2>&nbsp;</td></tr>
432433
<tr><td><kbd>R</kbd></td> <td>mark all read</td></tr>

src/assets/javascripts/key.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ var shortcutFunctions = {
6060
scrollBackward: function() {
6161
helperFunctions.scrollContent(-1)
6262
},
63+
closeItem: function () {
64+
vm.itemSelected = null
65+
},
6366
showAll() {
6467
vm.filterSelected = ''
6568
},
@@ -85,6 +88,7 @@ var keybindings = {
8588
"h": shortcutFunctions.previousFeed,
8689
"f": shortcutFunctions.scrollForward,
8790
"b": shortcutFunctions.scrollBackward,
91+
"q": shortcutFunctions.closeItem,
8892
"1": shortcutFunctions.showUnread,
8993
"2": shortcutFunctions.showStarred,
9094
"3": shortcutFunctions.showAll,
@@ -103,6 +107,7 @@ var codebindings = {
103107
"KeyH": shortcutFunctions.previousFeed,
104108
"KeyF": shortcutFunctions.scrollForward,
105109
"KeyB": shortcutFunctions.scrollBackward,
110+
"KeyQ": shortcutFunctions.closeItem,
106111
"Digit1": shortcutFunctions.showUnread,
107112
"Digit2": shortcutFunctions.showStarred,
108113
"Digit3": shortcutFunctions.showAll,

0 commit comments

Comments
 (0)