]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/windows/keyboard.cpp
Include the matching header first in .cpp files
[libs/gui.git] / source / input / windows / keyboard.cpp
index d9810b18a8416b837054c38fe5617110f8fa6a01..47f2256a20b3eb9f534b84f1b212f3616bad3ba4 100644 (file)
@@ -1,6 +1,6 @@
+#include "keyboard.h"
 #include <windows.h>
 #include <msp/graphics/window_private.h>
-#include "keyboard.h"
 #include "keys.h"
 #include "keys_private.h"
 
@@ -44,7 +44,9 @@ void Keyboard::input_event(const Graphics::Window::Event &event)
                                else
                                        key = VK_LSHIFT;
                        }
-                       set_button_state(key_from_sys(key), (event.msg==WM_KEYDOWN || event.msg==WM_SYSKEYDOWN), true);
+                       set_button_state(key_from_sys(key), false, true);
+                       if(event.msg==WM_KEYDOWN || event.msg==WM_SYSKEYDOWN)
+                               set_button_state(key_from_sys(key), true, true);
                }
                break;
        case WM_CHAR: