summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hofmann <scm@uninformativ.de>2020-04-24 18:16:09 +0200
committerPeter Hofmann <scm@uninformativ.de>2020-04-24 18:16:09 +0200
commitd60f720e89d44eca1d3be5ff0ea03465e3a9d4dc (patch)
tree5b8943691d44491de44dc8c33a2829ce7dc0ca9c
parent9042df121715baa86a1ef878a04d0184786b4209 (diff)
downloadlariza-d60f720e89d44eca1d3be5ff0ea03465e3a9d4dc.tar.gz
Add hotkeys for switching tabs
-rw-r--r--browser.c8
-rw-r--r--man1/lariza.usage.13
2 files changed, 9 insertions, 2 deletions
diff --git a/browser.c b/browser.c
index 7f8d3f7..f8a7bf7 100644
--- a/browser.c
+++ b/browser.c
@@ -872,6 +872,12 @@ key_common(GtkWidget *widget, GdkEvent *event, gpointer data)
webkit_web_view_get_uri(WEBKIT_WEB_VIEW(c->web_view)));
external_handler_run(NULL, NULL, c);
return TRUE;
+ case GDK_KEY_a: /* go one tab to the left (left hand) */
+ gtk_notebook_prev_page(GTK_NOTEBOOK(mw.notebook));
+ return TRUE;
+ case GDK_KEY_s: /* go one tab to the right (left hand) */
+ gtk_notebook_next_page(GTK_NOTEBOOK(mw.notebook));
+ return TRUE;
}
}
/* navigate backward (left hand) */
@@ -1081,8 +1087,6 @@ mainwindow_setup(void)
gtk_container_add(GTK_CONTAINER(mw.win), mw.notebook);
g_signal_connect(G_OBJECT(mw.notebook), "switch-page",
G_CALLBACK(mainwindow_title_before), NULL);
-
- /* XXX Global hotkeys to change tabs are missing */
}
void
diff --git a/man1/lariza.usage.1 b/man1/lariza.usage.1
index 7c00b6d..ebed676 100644
--- a/man1/lariza.usage.1
+++ b/man1/lariza.usage.1
@@ -51,6 +51,9 @@ Repeat the last search (backward).
\fBMod1\fP + \fBc\fP
Reload trusted certificates.
.TP
+\fBMod1\fP + \fBa\fP / \fBMod1\fP + \fBs\fP
+Select tab to the left / right.
+.TP
\fBF2\fP / \fBF3\fP
Go backward and forward in current browser history.
.P