Added home and end to browser window.
authorJohn Ladan <jladan@uwaterloo.ca>
Fri, 25 Oct 2013 16:32:44 +0000 (12:32 -0400)
committerJohn Ladan <jladan@uwaterloo.ca>
Fri, 25 Oct 2013 16:32:44 +0000 (12:32 -0400)
browser.py

index d93fc2c..2db9e49 100644 (file)
@@ -199,6 +199,12 @@ class browserWindow:
         elif ch == curses.KEY_NPAGE:
             self.scroll(+self.pageSize)
             self.mvHighlight(+self.pageSize)
+        elif ch == curses.KEY_HOME:
+            self.scroll(-len(self.entries))
+            self.mvHighlight(-len(self.entries))
+        elif ch == curses.KEY_END:
+            self.scroll(len(self.entries))
+            self.mvHighlight(len(self.entries))
         elif ch == 47: # forward slash
             string = self.hb.getSearch()
             hl = self.search(string)