svx/source/tbxctrls/tbunosearchcontrollers.cxx | 4 ++-- vcl/source/control/edit.cxx | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-)
New commits: commit e9564f1d727e89e8ab7c441a80a3944de10b3d3d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Sep 29 12:56:32 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Sep 29 15:02:11 2021 +0200 Resolves: tdf#144783 shift+RETURN not searching backwards In gtk nothing is happening, in gen its searching forwards. Align backends so that Activate is emitted only on a bare return in both and then handle shift+RETURN explicitly for the search widget Change-Id: I142002bbaf6b3aca83800a442096a4b1024fe097 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122814 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 786c95698c05..d315e79f9b3b 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -297,8 +297,8 @@ IMPL_LINK(FindTextFieldControl, KeyInputHdl, const KeyEvent&, rKeyEvent, bool) else if ( bMod1 && nCode == KEY_F ) m_xWidget->select_entry_region(0, -1); - // Execute the search when Ctrl-G or F3 pressed (in addition to ActivateHdl conditions) - else if ( (bMod1 && (KEY_G == nCode)) || (KEY_F3 == nCode) ) + // Execute the search when Ctrl-G, F3 and Shift-RETURN pressed (in addition to ActivateHdl condition which handles bare RETURN) + else if ( (bMod1 && KEY_G == nCode) || (bShift && KEY_RETURN == nCode) || (KEY_F3 == nCode) ) { ActivateFind(bShift); bRet = true; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index a42ea92ba5c2..8bb8e15f0834 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1674,10 +1674,8 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) break; case KEY_RETURN: - if (maActivateHdl.IsSet()) - { + if (maActivateHdl.IsSet() && !rKEvt.GetKeyCode().GetModifier()) bDone = maActivateHdl.Call(*this); - } break; default: