Compare commits
3 commits
2fa53876e6
...
4da3081ef6
Author | SHA1 | Date | |
---|---|---|---|
dece | 4da3081ef6 | ||
dece | 115fd43f09 | ||
dece | 2ea8f60739 |
|
@ -130,7 +130,9 @@ class Browser:
|
||||||
self.screen.clear()
|
self.screen.clear()
|
||||||
self.screen.refresh()
|
self.screen.refresh()
|
||||||
|
|
||||||
curses.mousemask(curses.ALL_MOUSE_EVENTS)
|
mousemask = curses.mousemask(curses.ALL_MOUSE_EVENTS)
|
||||||
|
if mousemask == 0:
|
||||||
|
logging.error("Could not enable mouse support.")
|
||||||
curses.curs_set(0)
|
curses.curs_set(0)
|
||||||
init_colors()
|
init_colors()
|
||||||
|
|
||||||
|
@ -186,19 +188,19 @@ class Browser:
|
||||||
self.quick_command("")
|
self.quick_command("")
|
||||||
elif char == ord("r"):
|
elif char == ord("r"):
|
||||||
self.reload_page()
|
self.reload_page()
|
||||||
elif char == ord("h"):
|
elif char == ord("h") or char == curses.KEY_LEFT:
|
||||||
self.scroll_page_horizontally(-3)
|
self.scroll_page_horizontally(-3)
|
||||||
elif char == ord("H"):
|
elif char == ord("H"):
|
||||||
self.scroll_whole_page_left()
|
self.scroll_whole_page_left()
|
||||||
elif char == ord("j"):
|
elif char == ord("j") or char == curses.KEY_DOWN:
|
||||||
self.scroll_page_vertically(3)
|
self.scroll_page_vertically(3)
|
||||||
elif char == ord("J"):
|
elif char == ord("J") or char == curses.KEY_NPAGE:
|
||||||
self.scroll_whole_page_down()
|
self.scroll_whole_page_down()
|
||||||
elif char == ord("k"):
|
elif char == ord("k") or char == curses.KEY_UP:
|
||||||
self.scroll_page_vertically(-3)
|
self.scroll_page_vertically(-3)
|
||||||
elif char == ord("K"):
|
elif char == ord("K") or char == curses.KEY_PPAGE:
|
||||||
self.scroll_whole_page_up()
|
self.scroll_whole_page_up()
|
||||||
elif char == ord("l"):
|
elif char == ord("l") or char == curses.KEY_RIGHT:
|
||||||
self.scroll_page_horizontally(3)
|
self.scroll_page_horizontally(3)
|
||||||
elif char == ord("L"):
|
elif char == ord("L"):
|
||||||
self.scroll_whole_page_right()
|
self.scroll_whole_page_right()
|
||||||
|
@ -233,7 +235,10 @@ class Browser:
|
||||||
elif curses.ascii.isdigit(char):
|
elif curses.ascii.isdigit(char):
|
||||||
self.handle_digit_input(char)
|
self.handle_digit_input(char)
|
||||||
elif char == curses.KEY_MOUSE:
|
elif char == curses.KEY_MOUSE:
|
||||||
|
try:
|
||||||
self.handle_mouse(*curses.getmouse())
|
self.handle_mouse(*curses.getmouse())
|
||||||
|
except curses.error:
|
||||||
|
pass
|
||||||
elif char == curses.KEY_RESIZE:
|
elif char == curses.KEY_RESIZE:
|
||||||
self.handle_resize()
|
self.handle_resize()
|
||||||
elif char == curses.ascii.ESC: # Can be ESC or ALT char.
|
elif char == curses.ascii.ESC: # Can be ESC or ALT char.
|
||||||
|
|
|
@ -11,13 +11,13 @@ Keybinds using the SHIFT key are written uppercase. Keybinds using the ALT (or M
|
||||||
|
|
||||||
* colon: focus the command-line
|
* colon: focus the command-line
|
||||||
* r: reload page
|
* r: reload page
|
||||||
* h: scroll left a bit
|
* h (or left): scroll left a bit
|
||||||
* j: scroll down a bit
|
* j (or down): scroll down a bit
|
||||||
* k: scroll up a bit
|
* k (or up): scroll up a bit
|
||||||
* l: scroll right a bit
|
* l (or right): scroll right a bit
|
||||||
* H: scroll left a whole page
|
* H: scroll left a whole page
|
||||||
* J: scroll down a whole page
|
* J (or page down): scroll down a whole page
|
||||||
* K: scroll up a whole page
|
* K (or page up): scroll up a whole page
|
||||||
* L: scroll right a whole page
|
* L: scroll right a whole page
|
||||||
* M-h: scroll one column left
|
* M-h: scroll one column left
|
||||||
* M-j: scroll one line down
|
* M-j: scroll one line down
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
WELCOME_PAGE = """\
|
WELCOME_PAGE = """\
|
||||||
# Bebop
|
# Bebop
|
||||||
|
|
||||||
Hi! Welcome to the Bebop browser! 🚀🎶
|
Welcome to the Bebop browser! 🚀
|
||||||
|
|
||||||
Press "?" or type ":help" and enter to see the keybinds, commands and more, \
|
Press "?" or type ":help" and enter to see the keybinds, commands and more, \
|
||||||
or visit the link below by pressing its link ID (1). To start browsing \
|
or visit the link below by pressing its link ID (1). To start browsing \
|
||||||
|
@ -14,4 +14,8 @@ right away, press "o", type an URL and press Enter.
|
||||||
|
|
||||||
You can configure which page to show up when starting Bebop instead of this \
|
You can configure which page to show up when starting Bebop instead of this \
|
||||||
one: set your home URL in the "home" key of your configuration file.
|
one: set your home URL in the "home" key of your configuration file.
|
||||||
|
|
||||||
|
New to Gemini? Check out this catalog of capsules to get you started:
|
||||||
|
|
||||||
|
=> gemini://medusae.space/ medusae.space
|
||||||
"""
|
"""
|
||||||
|
|
Reference in a new issue