1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-09-06 20:54:31 +00:00

Ensures left and right cursor keys work.

This commit is contained in:
Thomas Harte 2018-04-18 22:23:31 -04:00
parent f5ae8d0f79
commit b4a2d1395c

View File

@ -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);
}
}