1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-22 08:16:42 +00:00

Further improvement: if in physical mode, but pressing an unrecognised key, attempt to 'type' it.

This commit is contained in:
Thomas Harte
2020-03-02 22:08:54 -05:00
parent dc47a2b7d7
commit 1f41d9c5f5
9 changed files with 53 additions and 25 deletions
+9 -3
View File
@@ -355,12 +355,18 @@ class ConcreteMachine:
return keyboard_;
}
void keyboard_did_change_key(Inputs::Keyboard *, Inputs::Keyboard::Key key, bool is_pressed) final {
bool keyboard_did_change_key(Inputs::Keyboard *, Inputs::Keyboard::Key key, bool is_pressed) final {
if(key == Inputs::Keyboard::Key::Enter) {
pause_is_pressed_ = is_pressed;
} else if(key == Inputs::Keyboard::Key::Escape) {
reset_is_pressed_ = is_pressed;
return true;
}
if(key == Inputs::Keyboard::Key::Escape) {
reset_is_pressed_ = is_pressed;
return true;
}
return false;
}
void reset_all_keys(Inputs::Keyboard *) final {