sfx2/source/sidebar/FocusManager.cxx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
New commits: commit 5e45ff5241546ce564eccefcc8b7fff876801415 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Thu Oct 11 21:37:24 2018 -0800 Commit: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> CommitDate: Mon Nov 5 08:48:56 2018 +0100 tdf#120534 Make escape key focus to document from sidebar from all locations other than panel content Change-Id: I85a113d3001338dd1aff27bac75a5debd4635d59 Reviewed-on: https://gerrit.libreoffice.org/62808 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx index 9645cb182f4d..610e28a4b66f 100644 --- a/sfx2/source/sidebar/FocusManager.cxx +++ b/sfx2/source/sidebar/FocusManager.cxx @@ -27,6 +27,8 @@ #include <vcl/toolbox.hxx> #include <toolkit/helper/vclunohelper.hxx> +#include <sfx2/app.hxx> + namespace sfx2 { namespace sidebar { FocusManager::FocusLocation::FocusLocation (const PanelComponent eComponent, const sal_Int32 nIndex) @@ -371,6 +373,26 @@ void FocusManager::HandleKeyEvent ( switch (rKeyCode.GetCode()) { + case KEY_ESCAPE: + switch (aLocation.meComponent) + { + case PC_TabBar: + case PC_DeckTitle: + case PC_DeckToolBox: + case PC_PanelTitle: + case PC_PanelToolBox: + { + vcl::Window* pFocusWin = Application::GetFocusWindow(); + if (pFocusWin) + pFocusWin->GrabFocusToDocument(); + break; + } + + default: + break; + } + return; + case KEY_SPACE: switch (aLocation.meComponent) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits