]> spindle.queued.net Git - midori/commitdiff
Interpret Backspace as going back
authorChristian Dywan <christian@twotoasts.de>
Sat, 14 May 2011 23:43:26 +0000 (01:43 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 14 May 2011 23:43:26 +0000 (01:43 +0200)
A user continually hitting the Backspace key and then mousing
for the Back button, someone who rarely uses shortcuts at all.

midori/midori-browser.c

index 3b01e88014e4383d49a0274096ef89ab8e47369e..1fcbdde08be41dbebc8a8fef4422115ad3db9f01 100644 (file)
@@ -1708,6 +1708,13 @@ 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)
+    {
+        gtk_action_activate (_action_by_name (browser, "Back"));
+        return TRUE;
+    }
+
     widget_class = g_type_class_peek_static (g_type_parent (GTK_TYPE_WINDOW));
     return widget_class->key_press_event (widget, event);
 }