diff options
author | NickWingate <nick.wingate@collabora.com> | 2024-08-15 16:19:58 +0100 |
---|---|---|
committer | vivek javiya <vivek.javiya@collabora.com> | 2024-11-13 15:27:41 +0100 |
commit | fa3e9a2f31bac6bf17415373656de854f8825b6b (patch) | |
tree | 8168d8732502de13ac1f563e18d3fadcaf7c2ad9 /sfx2 | |
parent | 7c5476ada992ed6dc4759c18af9de0042a6b66eb (diff) |
Enable context menu key in online
Catch and execute context menu command when
called from online.
Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: I5cca5c7855f5b87f7850c9248e27aa20382dde04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171914
Reviewed-by: vivek javiya <vivek.javiya@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 5e969a45d36b7e76b4e1e168263bcf2fefddfcef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176529
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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: |