From 795b44ebe65e6bc045f517773d0683b50a3baac1 Mon Sep 17 00:00:00 2001 From: stippi Date: Thu, 20 May 2010 18:49:18 +0000 Subject: [PATCH] F11 -> Toggle fullscreen F5 -> Reload page. (Ticket #56) git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@509 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserWindow.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index a2c8fb0ae1..d5b037fe3d 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -506,6 +506,21 @@ BrowserWindow::DispatchMessage(BMessage* message, BHandler* target) } else if (bytes[0] == B_RIGHT_ARROW && modifiers == B_COMMAND_KEY) { PostMessage(GO_FORWARD); return; + } else if (bytes[0] == B_FUNCTION_KEY) { + // Some function key Firefox compatibility + int32 key; + if (message->FindInt32("key", &key) == B_OK) { + switch (key) { + case B_F5_KEY: + PostMessage(RELOAD); + break; + case B_F11_KEY: + PostMessage(TOGGLE_FULLSCREEN); + break; + default: + break; + } + } } else if (target == fURLInputGroup->TextView()) { // Handle B_RETURN in the URL text control. This is the easiest // way to react *only* when the user presses the return key in the