mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Add repeat-only functionality.
This commit is contained in:
parent
21e6f4d823
commit
1b5b3e575c
@ -339,6 +339,13 @@ template <Analyser::Static::AppleII::Target::Model model> class ConcreteMachine:
|
|||||||
case Key::F5: case Key::F6: case Key::F7: case Key::F8:
|
case Key::F5: case Key::F6: case Key::F7: case Key::F8:
|
||||||
case Key::F9: case Key::F10: case Key::F11:
|
case Key::F9: case Key::F10: case Key::F11:
|
||||||
repeat_is_pressed = is_pressed;
|
repeat_is_pressed = is_pressed;
|
||||||
|
|
||||||
|
if constexpr (!is_iie()) {
|
||||||
|
if(is_pressed && !is_repeat) {
|
||||||
|
value = last_key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case Key::F12:
|
case Key::F12:
|
||||||
@ -391,6 +398,7 @@ template <Analyser::Static::AppleII::Target::Model model> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(is_pressed) {
|
if(is_pressed) {
|
||||||
|
last_key = value;
|
||||||
keyboard_input = uint8_t(value | 0x80);
|
keyboard_input = uint8_t(value | 0x80);
|
||||||
key_is_down = true;
|
key_is_down = true;
|
||||||
} else {
|
} else {
|
||||||
@ -410,6 +418,7 @@ template <Analyser::Static::AppleII::Target::Model model> class ConcreteMachine:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char last_key = 0;
|
||||||
bool repeat_is_pressed = false;
|
bool repeat_is_pressed = false;
|
||||||
bool shift_is_pressed = false;
|
bool shift_is_pressed = false;
|
||||||
bool control_is_pressed = false;
|
bool control_is_pressed = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user