]> spindle.queued.net Git - midori/commitdiff
Interpret Shift+Backspace as going forward
authorChristian Dywan <christian@twotoasts.de>
Tue, 19 Jul 2011 20:14:07 +0000 (22:14 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 19 Jul 2011 20:14:07 +0000 (22:14 +0200)
Analogous to Backspace for back.

midori/midori-browser.c

index 3f962100ecad988b1e7d3c454b792f88b602c507..fe95d9ece2cce619ffc63a621c6e223b8c4c1049 100644 (file)
@@ -1657,8 +1657,14 @@ midori_browser_key_press_event (GtkWidget*   widget,
     if (event->state && gtk_window_propagate_key_event (window, event))
         return TRUE;
 
-    /* Interpret Backspace as going back for compatibility */
-    if (event->keyval == GDK_BackSpace)
+    /* Interpret (Shift+)Backspace as going back (forward) for compatibility */
+    if ((event->keyval == GDK_BackSpace)
+     && (event->state & GDK_SHIFT_MASK))
+    {
+        gtk_action_activate (_action_by_name (browser, "Forward"));
+        return TRUE;
+    }
+    else if (event->keyval == GDK_BackSpace)
     {
         gtk_action_activate (_action_by_name (browser, "Back"));
         return TRUE;