3 This file is part of libmspgbase
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
13 Keyboard::Keyboard(Graphics::Window &window)
15 buttons.resize(256, false);
17 window.signal_key_press.connect(sigc::mem_fun(this, &Keyboard::key_press));
18 window.signal_key_release.connect(sigc::mem_fun(this, &Keyboard::key_release));
21 void Keyboard::key_press(unsigned key, unsigned, unsigned)
23 set_button_state(key, true, true);
26 void Keyboard::key_release(unsigned key, unsigned)
28 set_button_state(key, false, true);