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 /vcl/unx/generic/window | |
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 'vcl/unx/generic/window')
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 4667d4076c7f..9f5c6905ed43 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -3101,6 +3101,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent ) || nKeySym == XK_Super_L || nKeySym == XK_Super_R ) { SalKeyModEvent aModEvt; + aModEvt.mbDown = false; // auto-accelerator feature not supported here. aModEvt.mnModKeyCode = ModKeyFlags::NONE; if( pEvent->type == KeyPress && mnExtKeyMod == ModKeyFlags::NONE ) mbSendExtKeyModChange = true; |