1 #ifndef MSP_INPUT_KEYBOARD_H_
2 #define MSP_INPUT_KEYBOARD_H_
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/mspgui_api.h>
6 #include <msp/graphics/window.h>
7 #include <msp/stringcodec/ustring.h>
14 Adapts key events from a window to the abstracted input framework. Key codes
15 are translated to platform-independent values. See keys.h for a list.
17 class MSPGUI_API Keyboard: public Device, public sigc::trackable
20 sigc::signal<bool, StringCodec::unichar>::accumulated<EventAccumulator> signal_character;
23 Graphics::Window &window;
26 Keyboard(Graphics::Window &);
29 std::string get_button_name(unsigned) const override;
31 void input_event(const Graphics::Window::Event &);