Support J/K as hotkeys for page_down/page_up

(imported from commit f4d092e3a3ccd5fad5e39fb6e6c454fbfeddfa50)
This commit is contained in:
Steve Howell 2013-07-17 11:37:27 -04:00
parent d8ad217bab
commit d61ebc2385
2 changed files with 11 additions and 3 deletions

View File

@ -24,11 +24,11 @@
<td class="definition">Initiate a search</td>
</tr>
<tr>
<td class="hotkey">PgUp, PgDn</td>
<td class="definition">Scroll up or down</td>
<td class="hotkey">PgUp, K</td>
<td class="definition">Scroll up</td>
</tr>
<tr>
<td class="hotkey">Spacebar</td>
<td class="hotkey">PgDn, J, Spacebar</td>
<td class="definition">Scroll down</td>
</tr>
<tr>

View File

@ -27,6 +27,10 @@ var actions_dropdown_hotkeys = [
];
function get_event_name(e) {
// Note that multiple keys can map to the same event_name, which
// we'll do in cases where they have the exact same semantics.
// DON'T FORGET: update keyboard_shortcuts.html
if ((e.which === 9) && e.shiftKey) {
return 'shift_tab';
}
@ -74,6 +78,10 @@ function get_event_name(e) {
return 'show_shortcuts';
case 67: // 'C'
return 'compose_private_message';
case 74: // 'J'
return 'page_down';
case 75: // 'K'
return 'page_up';
case 82: // 'R': respond to author
return 'respond_to_author';
case 83: //'S'