organize shortcuts a bit better

This commit is contained in:
NunoSempere 2024-04-14 08:56:03 -04:00
parent 8aa43e81fc
commit 99ad21b850

View File

@ -52,24 +52,31 @@ You could also look into commit afe93518a for an approach using stand-in code.
typedef enum { typedef enum {
goback, goback,
goforward, goforward,
refresh, refresh,
refresh_force, refresh_force,
back_to_home, back_to_home,
toggle_fullscreen, toggle_fullscreen,
toggle_custom_style, toggle_custom_style,
zoomin, zoomin,
zoomout, zoomout,
zoom_reset, zoom_reset,
new_tab, new_tab,
next_tab, next_tab,
prev_tab, prev_tab,
close_tab, close_tab,
show_searchbar, show_searchbar,
hide_bar,
show_finder, show_finder,
finder_next, finder_next,
finder_prev, finder_prev,
prettify, prettify,
hide_bar
} func; } func;
@ -80,25 +87,32 @@ static struct {
} shortcut[] = { } shortcut[] = {
{ CTRL, KEY(h), goback }, { CTRL, KEY(h), goback },
{ CTRL, KEY(j), goforward }, { CTRL, KEY(j), goforward },
{ CTRL, KEY(r), refresh }, { CTRL, KEY(r), refresh },
{ CTRL, KEY(R), refresh_force }, { CTRL, KEY(R), refresh_force },
{ CTRL, KEY(H), back_to_home }, { CTRL, KEY(H), back_to_home },
{ 0x0, KEY(F11), toggle_fullscreen },
{ CTRL, KEY(S), toggle_custom_style },
{ CTRL, KEY(equal), zoomin }, { CTRL, KEY(equal), zoomin },
{ CTRL, KEY(minus), zoomout }, { CTRL, KEY(minus), zoomout },
{ CTRL, KEY(0), zoom_reset }, { CTRL, KEY(0), zoom_reset },
{ CTRL, KEY(KP_Page_Up), prev_tab }, { CTRL, KEY(KP_Page_Up), prev_tab },
{ CTRL, KEY(KP_Page_Down), next_tab }, { CTRL, KEY(KP_Page_Down), next_tab },
{ CTRL, KEY(Page_Up), prev_tab }, // working hypothesis: Page_UP vs KP_Page_Up might depend on whether the user has a numpad { CTRL, KEY(Page_Up), prev_tab }, // working hypothesis: Page_UP vs KP_Page_Up might depend on whether the user has a numpad
{ CTRL, KEY(Page_Down), next_tab }, { CTRL, KEY(Page_Down), next_tab },
{ CTRL, KEY(t), new_tab }, { CTRL, KEY(t), new_tab },
{ CTRL, KEY(w), close_tab }, { CTRL, KEY(w), close_tab },
{ 0x0, KEY(F11), toggle_fullscreen },
{ CTRL, KEY(S), toggle_custom_style },
{ CTRL, KEY(l), show_searchbar }, { CTRL, KEY(l), show_searchbar },
{ CTRL, KEY(semicolon), hide_bar }, { CTRL, KEY(semicolon), hide_bar },
{ CTRL, KEY(f), show_finder }, { CTRL, KEY(f), show_finder },
{ CTRL, KEY(n), finder_next }, { CTRL, KEY(n), finder_next },
{ CTRL, KEY(N), finder_prev }, { CTRL, KEY(N), finder_prev },
{ CTRL, KEY(p), prettify } { CTRL, KEY(p), prettify }
}; };