diff --git a/src/GUI.hpp b/src/GUI.hpp index e8ab6c7..502f001 100644 --- a/src/GUI.hpp +++ b/src/GUI.hpp @@ -19,7 +19,7 @@ */ class GUI_Window : public Fl_Window { int x, y, button; - + vkvm::KeyCode* keyCode; int handle(int e); public: diff --git a/src/GUI_Window.cpp b/src/GUI_Window.cpp index 5e9b128..e1634a6 100644 --- a/src/GUI_Window.cpp +++ b/src/GUI_Window.cpp @@ -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<