summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-05-05 01:30:30 +0300
committerCaolán McNamara <caolanm@redhat.com>2017-05-25 21:42:02 +0200
commit30c17a288b03656633b626f6e7f679ca7c1aa6ff (patch)
tree63e4f34dae2459aaaf34a0cda4fa82367bcd5659 /include
parentf750372ac81cb51177cd6cbda39ecacd5f821590 (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. Reviewed-on: https://gerrit.libreoffice.org/37275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit fe0451259d2fb93c809c1bfa3baf5abd90019c58) Conflicts: include/vcl/commandevent.hxx vcl/source/window/commandevent.cxx vcl/unx/generic/window/salframe.cxx vcl/unx/gtk/gtksalframe.cxx vcl/unx/gtk3/gtk3gtkframe.cxx Change-Id: If188d6ccdc3b214a2c3ed20aad291d74d46b358f Reviewed-on: https://gerrit.libreoffice.org/37516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/commandevent.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/vcl/commandevent.hxx b/include/vcl/commandevent.hxx
index 371fd54716d9..adaa8ad953bb 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -187,11 +187,13 @@ public:
class VCL_DLLPUBLIC CommandModKeyData
{
private:
+ bool mbDown;
sal_uInt16 mnCode;
public:
- CommandModKeyData( sal_uInt16 nCode );
+ CommandModKeyData( sal_uInt16 nCode, bool bDown );
+ bool IsDown() const { return mbDown; }
bool IsMod1() const { return (mnCode & MODKEY_MOD1) != 0; }
bool IsMod2() const { return (mnCode & MODKEY_MOD2) != 0; }
bool IsLeftShift() const { return (mnCode & MODKEY_LSHIFT) != 0; }