mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Ensures left and right cursor keys work.
This commit is contained in:
parent
f5ae8d0f79
commit
b4a2d1395c
@ -200,6 +200,16 @@ class ConcreteMachine:
|
||||
|
||||
void set_key_pressed(Key key, char value, bool is_pressed) override {
|
||||
if(is_pressed) {
|
||||
// If no ASCII value is supplied, look for a few special cases.
|
||||
if(!value) {
|
||||
switch(key) {
|
||||
case Key::Left: value = 8; break;
|
||||
case Key::Right: value = 21; break;
|
||||
case Key::Down: value = 10; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
keyboard_input_ = static_cast<uint8_t>(value | 0x80);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user