summaryrefslogtreecommitdiff
path: root/include/vcl/commandevent.hxx
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-05-05 01:30:30 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2017-05-05 11:27:33 +0200
commitfe0451259d2fb93c809c1bfa3baf5abd90019c58 (patch)
treebf9739d56ffbe6e8b291ea5ee399d2cf315faa2b /include/vcl/commandevent.hxx
parente3a44cbb1d01a1fe5e6321b29e215f4a13ddee6a (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 'include/vcl/commandevent.hxx')
-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 4113975de118..7b143e402ce4 100644
--- a/include/vcl/commandevent.hxx
+++ b/include/vcl/commandevent.hxx
@@ -188,11 +188,13 @@ public:
class VCL_DLLPUBLIC CommandModKeyData
{
private:
+ bool mbDown;
ModKeyFlags mnCode;
public:
- CommandModKeyData( ModKeyFlags nCode );
+ CommandModKeyData( ModKeyFlags nCode, bool bDown );
+ bool IsDown() const { return mbDown; }
bool IsMod1() const { return bool(mnCode & ModKeyFlags::Mod1Msk); }
bool IsMod2() const { return bool(mnCode & ModKeyFlags::Mod2Msk); }
bool IsLeftShift() const { return bool(mnCode & ModKeyFlags::LeftShift); }