From c7019f15694a85ed2c2323a7b22fcc3f2a43a073 Mon Sep 17 00:00:00 2001 From: Julian Hinxlage Date: Tue, 26 Nov 2019 11:49:55 +0100 Subject: [PATCH] + keyboard buffer test --- main/main.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main/main.cpp b/main/main.cpp index 85592cb..6371304 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -14,6 +14,17 @@ int main() { vkvm::log(vkvm::INFO, "timer event callback"); }); + vkvm::buttonPressed(vkvm::KeyCode::A); + vkvm::buttonPressed(vkvm::KeyCode::D); + vkvm::buttonPressed(vkvm::KeyCode::Z); + vkvm::buttonPressed(vkvm::KeyCode::Backspcce); + + vkvm::KeyCode code = vkvm::getLastPressedKey(); + while(code != 0){ + vkvm::log(vkvm::INFO, "keyCode: ", code); + code = vkvm::getLastPressedKey(); + } + std::string input; while(input != "exit"){ std::cout << "type r for redraw and t for timer (exit to exit)" << std::endl;