diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-05 01:30:30 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-05 11:27:33 +0200 |
commit | fe0451259d2fb93c809c1bfa3baf5abd90019c58 (patch) | |
tree | bf9739d56ffbe6e8b291ea5ee399d2cf315faa2b /sw | |
parent | e3a44cbb1d01a1fe5e6321b29e215f4a13ddee6a (diff) |
tdf#103158 ctrl+shift should work on key up
Under gtk/gtk3 we send CommandEventId::ModKeyChange on
key down, to support the auto-accelerator feature. But
at least the handler in SwEditWin::Command must get it
on key up, in order to not interfere with other
ctrl+shift+X shortcuts, which work on key down.
To achieve that, we need:
- On key up pass the key that was just released, instead
of the current state of nothing being pressed.
- Have a flag of whether it's a key down or up event, so
it can be checked by the application code.
Change-Id: If188d6ccdc3b214a2c3ed20aad291d74d46b358f
Reviewed-on: https://gerrit.libreoffice.org/37275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 6e3ff6ca55ab..4645376d7223 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5480,7 +5480,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) case CommandEventId::ModKeyChange : { const CommandModKeyData* pCommandData = rCEvt.GetModKeyData(); - if (pCommandData->IsMod1() && !pCommandData->IsMod2()) + if (!pCommandData->IsDown() && pCommandData->IsMod1() && !pCommandData->IsMod2()) { sal_uInt16 nSlot = 0; if(pCommandData->IsLeftShift() && !pCommandData->IsRightShift()) |