From: Enrico Tröger Date: Sun, 31 May 2009 01:43:15 +0000 (+0200) Subject: Revisit inline find bindings to support the numpad '/' key X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dee538e419bc8ec43c4f17c29aec984a0e57674;p=midori Revisit inline find bindings to support the numpad '/' key --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 51216d41..6af6a93e 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -26,6 +26,7 @@ #include #include #include +#include #include /* This is unstable API, so we need to declare it */ @@ -1016,15 +1017,16 @@ gtk_widget_key_press_event_cb (WebKitWebView* web_view, MidoriView* view) { guint character = gdk_unicode_to_keyval (event->keyval); - /* Skip control characters */ - if (character == (event->keyval | 0x01000000)) - return FALSE; - if (character == '.' || character == '/') + if (event->keyval == '.' || event->keyval == '/' || event->keyval == GDK_KP_Divide) character = '\0'; else if (!view->find_while_typing) return FALSE; + /* Skip control characters */ + if (character == (event->keyval | 0x01000000)) + return FALSE; + if (!webkit_web_view_can_cut_clipboard (web_view) && !webkit_web_view_can_paste_clipboard (web_view)) {