Skip to content

Commit

Permalink
Map hotkeys for better section navigation
Browse files Browse the repository at this point in the history
This switches back to existing keyboard hotkeys, and allows the shifted
form of each hotkey to navigate to the next/prev section.

Fixes #862
  • Loading branch information
binford2k committed Mar 1, 2018
1 parent 6fae03e commit 1adb6db
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions lib/keymap.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
module Keymap
def self.default()
{
'space' => 'NEXT',
'd' => 'DEBUG',
'up' => 'PREV',
'left' => 'PREV',
'pageup' => 'PREVSEC',
'space' => 'NEXT',
'down' => 'NEXT',
'right' => 'NEXT',
'pagedown' => 'NEXTSEC',
'pagedown' => 'NEXT',
'up' => 'PREV',
'left' => 'PREV',
'pageup' => 'PREV',
'SPACE' => 'NEXTSEC',
'DOWN' => 'NEXTSEC',
'RIGHT' => 'NEXTSEC',
'PAGEDOWN' => 'NEXTSEC',
'UP' => 'PREVSEC',
'LEFT' => 'PREVSEC',
'PAGEUP' => 'PREVSEC',
'R' => 'RELOAD',
'r' => 'REFRESH',
'c' => 'CONTENTS',
Expand Down Expand Up @@ -169,6 +176,13 @@ def self.shiftedKeyDictionary()
"`" => "~",
"=" => "+",
"-" => "_",
"space" => "SPACE",
"down" => "DOWN",
"right" => "RIGHT",
"pagedown" => "PAGEDOWN",
"up" => "UP",
"left" => "LEFT",
"pageup" => "PAGEUP",
}
end

Expand Down

0 comments on commit 1adb6db

Please sign in to comment.