2 #include <msp/graphics/window_private.h>
5 #include "keys_private.h"
7 #define MAPVK_VK_TO_VSC 0
12 std::string Keyboard::get_button_name(unsigned btn) const
18 unsigned scan = MapVirtualKey(key_to_sys(btn), MAPVK_VK_TO_VSC);
19 if(!GetKeyNameText(scan<<16, buf, sizeof(buf)))
20 return Device::get_button_name(btn);
24 void Keyboard::input_event(const Graphics::Window::Event &event)
30 set_button_state(key_from_sys(event.wparam), event.msg==WM_KEYDOWN, true);
33 signal_character.emit(event.wparam);