sfx2/source/view/lokhelper.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 5e969a45d36b7e76b4e1e168263bcf2fefddfcef
Author:     NickWingate <[email protected]>
AuthorDate: Thu Aug 15 16:19:58 2024 +0100
Commit:     Szymon Kłos <[email protected]>
CommitDate: Wed Nov 13 11:07:40 2024 +0100

    Enable context menu key in online
    
    Catch and execute context menu command when
    called from online.
    
    Signed-off-by: NickWingate <[email protected]>
    Change-Id: I5cca5c7855f5b87f7850c9248e27aa20382dde04
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171914
    Reviewed-by: vivek javiya <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index d22f13f726b8..c525c673b15e 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -1113,6 +1113,14 @@ namespace
             for (sal_uInt16 i = 0; i <= nRepeat; ++i)
                 if (!pFocusWindow->isDisposed())
                     pFocusWindow->KeyInput(singlePress);
+
+            if (pLOKEv->maKeyEvent.GetKeyCode().GetCode() == KEY_CONTEXTMENU)
+            {
+                // later do use getCaretPosition probably, or get focused obj 
position, smt like that
+                Point aPos = pFocusWindow->GetPointerPosPixel();
+                CommandEvent aCEvt( aPos, CommandEventId::ContextMenu);
+                pFocusWindow->Command(aCEvt);
+            }
             break;
         }
         case VclEventId::WindowKeyUp:

Reply via email to