buttonPressed
This commit is contained in:
parent
9ce74862a2
commit
66f356c6a1
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
class GUI_Window : public Fl_Window {
|
||||
int x, y, button;
|
||||
|
||||
vkvm::KeyCode* keyCode;
|
||||
int handle(int e);
|
||||
|
||||
public:
|
||||
|
|
|
@ -41,12 +41,15 @@ auto GUI_Window::handle(int e) -> int {
|
|||
case FL_KEYBOARD:
|
||||
vkvm::callEvent(vkvm::EventType::KeyDown);
|
||||
button = Fl::event_button();
|
||||
std::cout << "Keyboard:" << (unsigned short) button << " down" << std::endl;
|
||||
keyCode = new vkvm::KeyCode(button);
|
||||
vkvm::buttonPressed(*keyCode);
|
||||
return 1;
|
||||
case FL_KEYUP:
|
||||
vkvm::callEvent(vkvm::EventType::KeyUp);
|
||||
button = Fl::event_button();
|
||||
std::cout << "Keyboard:" << (unsigned short) button << " up" << std::endl;
|
||||
std::cout<<button<<std::endl;
|
||||
keyCode = new vkvm::KeyCode(button);
|
||||
vkvm::buttonPressed(*keyCode);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue