]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/keyboard.cpp
Hide the platform-specific parts of other classes as well
[libs/gui.git] / source / input / keyboard.cpp
index 4372be4f42bd5fbcfc707a842eae1494511c9665..cef812c1344d3cdfa5f2c7ef181caf43d29c7f1c 100644 (file)
@@ -1,15 +1,22 @@
 /* $Id$
 
 This file is part of libmspgbase
-Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Copyright © 2007-2008  Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
+#ifdef WIN32
+#include <windows.h>
+#else
+#include <X11/Xlib.h>
+#endif
 #include <msp/strings/formatter.h>
 #include "../gbase/display.h"
 #include "keyboard.h"
 #include "keys.h"
 
+#define MAPVK_VK_TO_VSC 0
+
 namespace Msp {
 namespace Input {
 
@@ -35,7 +42,7 @@ std::string Keyboard::get_button_name(unsigned btn) const
        return str;
 #else
        char buf[128];
-       unsigned scan=MapVirtualKey(key_to_sys(btn), MAPVK_VK_TO_VCS);
+       unsigned scan=MapVirtualKey(key_to_sys(btn), MAPVK_VK_TO_VSC);
        if(!GetKeyNameText(scan<<16, buf, sizeof(buf)))
                return format("Key %d", btn);
        return buf;