Add vim shortcuts to the help page
This commit is contained in:
parent
ced7797173
commit
4bf0c7a4ef
@ -376,32 +376,26 @@
|
|||||||
document.onkeypress = function(e) {
|
document.onkeypress = function(e) {
|
||||||
|
|
||||||
switch (e.keyCode || e.which) {
|
switch (e.keyCode || e.which) {
|
||||||
case 112:
|
case 112: // p
|
||||||
|
case 107: // k
|
||||||
open_previous_item();
|
open_previous_item();
|
||||||
break;
|
break;
|
||||||
case 110:
|
case 110: // n
|
||||||
|
case 106: // j
|
||||||
open_next_item();
|
open_next_item();
|
||||||
break;
|
break;
|
||||||
case 118:
|
case 118: // v
|
||||||
open_original_item();
|
open_original_item();
|
||||||
break;
|
break;
|
||||||
case 111:
|
case 111: // o
|
||||||
open_item();
|
open_item();
|
||||||
break;
|
break;
|
||||||
case 109:
|
case 109: // m
|
||||||
change_item_status();
|
change_item_status();
|
||||||
break;
|
break;
|
||||||
case 102:
|
case 102: // f
|
||||||
bookmark_item();
|
bookmark_item();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//vim like navigation
|
|
||||||
case 107:
|
|
||||||
open_previous_item();
|
|
||||||
break;
|
|
||||||
case 106:
|
|
||||||
open_next_item();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
<div class="alert alert-normal">
|
<div class="alert alert-normal">
|
||||||
<h3><?= t('Keyboard shortcuts') ?></h3>
|
<h3><?= t('Keyboard shortcuts') ?></h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><?= t('Previous item') ?> = <strong>p</strong></li>
|
<li><?= t('Previous item') ?> = <strong>p</strong> <?= t('or') ?> <strong>j</strong></li>
|
||||||
<li><?= t('Next item') ?> = <strong>n</strong></li>
|
<li><?= t('Next item') ?> = <strong>n</strong> <?= t('or') ?> <strong>k</strong></li>
|
||||||
<li><?= t('Mark as read or unread') ?> = <strong>m</strong></li>
|
<li><?= t('Mark as read or unread') ?> = <strong>m</strong></li>
|
||||||
<li><?= t('Open original link') ?> = <strong>v</strong></li>
|
<li><?= t('Open original link') ?> = <strong>v</strong></li>
|
||||||
<li><?= t('Open item') ?> = <strong>o</strong></li>
|
<li><?= t('Open item') ?> = <strong>o</strong></li>
|
||||||
|
Loading…
Reference in New Issue
Block a user