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

New commits:
commit fa3e9a2f31bac6bf17415373656de854f8825b6b
Author:     NickWingate <nick.wing...@collabora.com>
AuthorDate: Thu Aug 15 16:19:58 2024 +0100
Commit:     vivek javiya <vivek.jav...@collabora.com>
CommitDate: Wed Nov 13 15:27:41 2024 +0100

    Enable context menu key in online
    
    Catch and execute context menu command when
    called from online.
    
    Signed-off-by: NickWingate <nick.wing...@collabora.com>
    Change-Id: I5cca5c7855f5b87f7850c9248e27aa20382dde04
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171914
    Reviewed-by: vivek javiya <vivek.jav...@collabora.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    (cherry picked from commit 5e969a45d36b7e76b4e1e168263bcf2fefddfcef)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176529
    Tested-by: Jenkins

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 29efd234f91f..f8e819a2cb93 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -1115,6 +1115,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