Compare commits

..

No commits in common. "4da3081ef6346ac792dff0226fa9e749464f3558" and "2fa53876e6f4ace4f25f1d1ec8287eae3f62a36c" have entirely different histories.

3 changed files with 15 additions and 24 deletions

View file

@ -130,9 +130,7 @@ class Browser:
self.screen.clear() self.screen.clear()
self.screen.refresh() self.screen.refresh()
mousemask = curses.mousemask(curses.ALL_MOUSE_EVENTS) 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()
@ -188,19 +186,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") or char == curses.KEY_LEFT: elif char == ord("h"):
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") or char == curses.KEY_DOWN: elif char == ord("j"):
self.scroll_page_vertically(3) self.scroll_page_vertically(3)
elif char == ord("J") or char == curses.KEY_NPAGE: elif char == ord("J"):
self.scroll_whole_page_down() self.scroll_whole_page_down()
elif char == ord("k") or char == curses.KEY_UP: elif char == ord("k"):
self.scroll_page_vertically(-3) self.scroll_page_vertically(-3)
elif char == ord("K") or char == curses.KEY_PPAGE: elif char == ord("K"):
self.scroll_whole_page_up() self.scroll_whole_page_up()
elif char == ord("l") or char == curses.KEY_RIGHT: elif char == ord("l"):
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()
@ -235,10 +233,7 @@ 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.

View file

@ -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 (or left): scroll left a bit * h: scroll left a bit
* j (or down): scroll down a bit * j: scroll down a bit
* k (or up): scroll up a bit * k: scroll up a bit
* l (or right): scroll right a bit * l: scroll right a bit
* H: scroll left a whole page * H: scroll left a whole page
* J (or page down): scroll down a whole page * J: scroll down a whole page
* K (or page up): scroll up a whole page * K: 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

View file

@ -3,7 +3,7 @@
WELCOME_PAGE = """\ WELCOME_PAGE = """\
# Bebop # Bebop
Welcome to the Bebop browser! 🚀 Hi! 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,8 +14,4 @@ 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
""" """