Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-15 17:01:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-15 17:01:01 +0400
commite9be94b82dd6bc00fc9ef4edad08c8854f2499ab (patch)
tree238ad241efe3a6d23649f729bafccb659a283dda /intern
parent42ae315aef305f22f8523a9ca5ea5a58f1586e27 (diff)
Fix #29233: Windows accessibility feature "sticky keys" for disabled people not working.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 78afe0bd680..4ae87da4efe 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -438,8 +438,12 @@ GHOST_TKey GHOST_SystemWin32::hardKey(GHOST_IWindow *window, RAWINPUT const& raw
GHOST_ModifierKeys modifiers;
system->retrieveModifierKeys(modifiers);
-
- *keyDown = !(raw.data.keyboard.Flags & RI_KEY_BREAK);
+
+ // RI_KEY_BREAK doesn't work for sticky keys release, so we also
+ // check for the up message
+ unsigned int msg = raw.data.keyboard.Message;
+ *keyDown = !(raw.data.keyboard.Flags & RI_KEY_BREAK) && msg != WM_KEYUP && msg != WM_SYSKEYUP;
+
key = this->convertKey(window, raw.data.keyboard.VKey, raw.data.keyboard.MakeCode, (raw.data.keyboard.Flags&(RI_KEY_E1|RI_KEY_E0)));
// extra handling of modifier keys: don't send repeats out from GHOST