From 85a401a87c2550aab3b2eb85e518ac43ed2ff533 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 11 Jun 2019 15:27:50 +1000
Subject: [PATCH] mshtml: Improve IOleInPlaceActiveObject TranslateAccelerator

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37058
---
 dlls/mshtml/oleobj.c | 24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/oleobj.c b/dlls/mshtml/oleobj.c
index 274db8c22b..ba02e811cc 100644
--- a/dlls/mshtml/oleobj.c
+++ b/dlls/mshtml/oleobj.c
@@ -1024,8 +1024,28 @@ static HRESULT WINAPI OleInPlaceActiveObject_ContextSensitiveHelp(IOleInPlaceAct
 static HRESULT WINAPI OleInPlaceActiveObject_TranslateAccelerator(IOleInPlaceActiveObject *iface, LPMSG lpmsg)
 {
     HTMLDocument *This = impl_from_IOleInPlaceActiveObject(iface);
-    FIXME("(%p)->(%p)\n", This, lpmsg);
-    return E_NOTIMPL;
+    HRESULT hres = S_FALSE;
+
+    TRACE("(%p)->(%p)\n", This, lpmsg);
+
+    switch(lpmsg->message)
+    {
+        case WM_KEYDOWN:
+            break;
+        case WM_KEYUP:
+        {
+            TRACE("Processing key %ld\n", lpmsg->wParam);
+            if (lpmsg->wParam == VK_F5)
+                hres = IOleCommandTarget_Exec(&This->IOleCommandTarget_iface, NULL, OLECMDID_REFRESH, 0, NULL, NULL);
+
+            break;
+        }
+        default:
+            FIXME("Unsupported message %04x\n", lpmsg->message);
+    }
+
+    TRACE("result 0x%08x\n", hres);
+    return hres;
 }
 
 static HRESULT WINAPI OleInPlaceActiveObject_OnFrameWindowActivate(IOleInPlaceActiveObject *iface,
-- 
2.17.1

