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