diff options
author | Jim Raykowski <raykowj@gmail.com> | 2019-05-01 22:18:30 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2019-05-04 02:35:33 +0200 |
commit | 3f6fcaa97e3f75c5f12febe821c63f0c2f96e07a (patch) | |
tree | 6cf5a2b528e991bc7d815150121f1ac79b05737d /framework/source/uielement | |
parent | 7ca7d61dc25f409e209b3a432c7f07469b17e316 (diff) |
tdf#105881 Toolbar keyboard navigation fixes
This patch makes toolbar keyboard navigation wrap to the begining or end
toolbar item and enables access to the overflow menu using the keyboard.
Change-Id: I5975b0f731beb00cf26f8e8a33e6ea4fa9322881
Reviewed-on: https://gerrit.libreoffice.org/71718
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Diffstat (limited to 'framework/source/uielement')
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 280958311ae4..e64eb89944ce 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -62,6 +62,7 @@ #include <comphelper/sequence.hxx> #include <svtools/miscopt.hxx> #include <svtools/imgdef.hxx> +#include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/menu.hxx> #include <vcl/syswin.hxx> @@ -1567,6 +1568,13 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar, void ) pOverflowToolBar->EnableDocking(); pOverflowToolBar->AddEventListener( LINK( this, ToolBarManager, OverflowEventListener ) ); vcl::Window::GetDockingManager()->StartPopupMode( pToolBar, pOverflowToolBar, FloatWinPopupFlags::AllMouseButtonClose ); + + // send HOME key to subtoolbar in order to select first item if keyboard activated + if(pToolBar->IsKeyEvent() ) + { + ::KeyEvent aEvent( 0, vcl::KeyCode( KEY_HOME ) ); + pOverflowToolBar->KeyInput(aEvent); + } } IMPL_LINK( ToolBarManager, OverflowEventListener, VclWindowEvent&, rWindowEvent, void ) |