1 #include <msp/graphics/window_private.h>
3 #include "keys_private.h"
10 string Keyboard::get_button_name(unsigned btn) const
12 return Device::get_button_name(btn);
15 void Keyboard::input_event(const Graphics::Window::Event &event)
17 switch(event.cevent.type)
21 if(unsigned key = key_from_sys(event.cevent.key.key))
22 set_button_state(key, event.cevent.type==KEY_DOWN, true);
23 if(event.cevent.type==KEY_DOWN && event.cevent.key.character>0)
24 signal_character.emit(event.cevent.key.character);