browser: support arrows and page {up,down}
This commit is contained in:
parent
2ea8f60739
commit
115fd43f09
|
@ -186,19 +186,19 @@ class Browser:
|
|||
self.quick_command("")
|
||||
elif char == ord("r"):
|
||||
self.reload_page()
|
||||
elif char == ord("h"):
|
||||
elif char == ord("h") or char == curses.KEY_LEFT:
|
||||
self.scroll_page_horizontally(-3)
|
||||
elif char == ord("H"):
|
||||
self.scroll_whole_page_left()
|
||||
elif char == ord("j"):
|
||||
elif char == ord("j") or char == curses.KEY_DOWN:
|
||||
self.scroll_page_vertically(3)
|
||||
elif char == ord("J"):
|
||||
elif char == ord("J") or char == curses.KEY_NPAGE:
|
||||
self.scroll_whole_page_down()
|
||||
elif char == ord("k"):
|
||||
elif char == ord("k") or char == curses.KEY_UP:
|
||||
self.scroll_page_vertically(-3)
|
||||
elif char == ord("K"):
|
||||
elif char == ord("K") or char == curses.KEY_PPAGE:
|
||||
self.scroll_whole_page_up()
|
||||
elif char == ord("l"):
|
||||
elif char == ord("l") or char == curses.KEY_RIGHT:
|
||||
self.scroll_page_horizontally(3)
|
||||
elif char == ord("L"):
|
||||
self.scroll_whole_page_right()
|
||||
|
|
|
@ -11,13 +11,13 @@ Keybinds using the SHIFT key are written uppercase. Keybinds using the ALT (or M
|
|||
|
||||
* colon: focus the command-line
|
||||
* r: reload page
|
||||
* h: scroll left a bit
|
||||
* j: scroll down a bit
|
||||
* k: scroll up a bit
|
||||
* l: scroll right a bit
|
||||
* h (or left): scroll left a bit
|
||||
* j (or down): scroll down a bit
|
||||
* k (or up): scroll up a bit
|
||||
* l (or right): scroll right a bit
|
||||
* H: scroll left a whole page
|
||||
* J: scroll down a whole page
|
||||
* K: scroll up a whole page
|
||||
* J (or page down): scroll down a whole page
|
||||
* K (or page up): scroll up a whole page
|
||||
* L: scroll right a whole page
|
||||
* M-h: scroll one column left
|
||||
* M-j: scroll one line down
|
||||
|
|
Reference in a new issue