From b4a2d1395c2550538188580555fec7915d5a314a Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 18 Apr 2018 22:23:31 -0400 Subject: [PATCH] Ensures left and right cursor keys work. --- Machines/AppleII/AppleII.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Machines/AppleII/AppleII.cpp b/Machines/AppleII/AppleII.cpp index 7c48243b8..1ed4875f6 100644 --- a/Machines/AppleII/AppleII.cpp +++ b/Machines/AppleII/AppleII.cpp @@ -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(value | 0x80); } }