Add vim shortcuts to the help page

This commit is contained in:
Frederic Guillot 2013-07-02 21:50:53 -04:00
parent ced7797173
commit 4bf0c7a4ef
2 changed files with 10 additions and 16 deletions

View File

@ -376,32 +376,26 @@
document.onkeypress = function(e) {
switch (e.keyCode || e.which) {
case 112:
case 112: // p
case 107: // k
open_previous_item();
break;
case 110:
case 110: // n
case 106: // j
open_next_item();
break;
case 118:
case 118: // v
open_original_item();
break;
case 111:
case 111: // o
open_item();
break;
case 109:
case 109: // m
change_item_status();
break;
case 102:
case 102: // f
bookmark_item();
break;
//vim like navigation
case 107:
open_previous_item();
break;
case 106:
open_next_item();
break;
}
};

View File

@ -42,8 +42,8 @@
<div class="alert alert-normal">
<h3><?= t('Keyboard shortcuts') ?></h3>
<ul>
<li><?= t('Previous item') ?> = <strong>p</strong></li>
<li><?= t('Next item') ?> = <strong>n</strong></li>
<li><?= t('Previous item') ?> = <strong>p</strong> <?= t('or') ?> <strong>j</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('Open original link') ?> = <strong>v</strong></li>
<li><?= t('Open item') ?> = <strong>o</strong></li>