diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/dlgctrl.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index adf416b21769..90cdf353f8c0 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -941,7 +941,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) } } } - else if (aKeyCode.IsMod2()) // tdf#151385 + else { sal_Unicode c = rKEvt.GetCharCode(); if ( c ) @@ -952,8 +952,13 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) GetFocusFlags nGetFocusFlags = GetFocusFlags::Mnemonic; if ( pSWindow == ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ) ) nGetFocusFlags |= GetFocusFlags::UniqueMnemonic; - pSWindow->ImplControlFocus( nGetFocusFlags ); - return true; + // tdf#157649 Allow omitting the Alt key when focus is in the dialog action area: + bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pSWindow->GetParent()) != nullptr; + if ((bIsButtonBox && pSWindow->GetParent()->HasChildPathFocus(true)) || aKeyCode.IsMod2()) + { + pSWindow->ImplControlFocus( nGetFocusFlags ); + return true; + } } } } |