my eye

Add keybindings for page up/down and scroll to top/bottom

Committed 21295f

--- a/canopy/templates/template.html
+++ b/canopy/templates/template.html

     else if (ev.key == 'j') scrollDown()                // j   scroll down 3 EMs
     else if (ev.key == 'k') scrollUp()                  // k   scroll up 3 EMs
     else if (ev.key == 'l') goForward()                 // l   go forward
+    else if (ev.key == '[') pageUp()                    // [   scroll page up
+    else if (ev.key == ']') pageDown()                  // ]   scroll page down
+    else if (ev.key == '{') scrollTop()                 // {   scroll to top
+    else if (ev.key == '}') scrollBottom()              // }   scroll to bottom
     else if (ev.key == 'u') goUp()                      // u   follow rel=up
     else if (ev.key == 'p') goPrevious()                // p   follow rel=prev
     else if (ev.key == 'n') goNext()                    // n   follow rel=next
 const goForward = () => { history.forward() }
 const scrollDown = () => { document.documentElement.scrollTop += 3 * em }
 const scrollUp = () => { document.documentElement.scrollTop -= 3 * em }
+const pageUp = () => { document.documentElement.scrollTop -= 15 * em }
+const pageDown = () => { document.documentElement.scrollTop += 15 * em }
+const scrollTop = () => { document.documentElement.scrollTop = 0 }
+const scrollBottom = () => { document.documentElement.scrollTop = 99999 }
 
 let following = false
 let followList = {}