X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finput%2Fkeyboard.cpp;h=cef812c1344d3cdfa5f2c7ef181caf43d29c7f1c;hb=fcd5f24311fcfe772825a75678e038749401a9be;hp=4372be4f42bd5fbcfc707a842eae1494511c9665;hpb=7a4a508629d370c4a79791c7e62fd6f59e8564e9;p=libs%2Fgui.git diff --git a/source/input/keyboard.cpp b/source/input/keyboard.cpp index 4372be4..cef812c 100644 --- a/source/input/keyboard.cpp +++ b/source/input/keyboard.cpp @@ -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 +#else +#include +#endif #include #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;