1
0
mirror of https://github.com/TomHarte/CLK.git synced 2026-04-25 11:17:26 +00:00

Extends logic for when to fall back on standard keypress logic even in logical mode.

This commit is contained in:
Thomas Harte
2020-03-01 20:25:12 -05:00
parent 611182910a
commit ed18092088
14 changed files with 60 additions and 5 deletions
@@ -36,6 +36,14 @@ void MultiKeyboardMachine::type_string(const std::string &string) {
}
}
bool MultiKeyboardMachine::can_type(char c) {
bool can_type = true;
for(const auto &machine: machines_) {
can_type &= machine->can_type(c);
}
return can_type;
}
Inputs::Keyboard &MultiKeyboardMachine::get_keyboard() {
return keyboard_;
}
@@ -51,6 +51,7 @@ class MultiKeyboardMachine: public KeyboardMachine::Machine {
void clear_all_keys() final;
void set_key_state(uint16_t key, bool is_pressed) final;
void type_string(const std::string &) final;
bool can_type(char c) final;
Inputs::Keyboard &get_keyboard() final;
};