mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 08:49:37 +00:00
Adds a second virtual key, for break.
This commit is contained in:
parent
77c0cc8b5f
commit
9273e9b6ed
@ -31,6 +31,7 @@ uint16_t KeyboardMapper::mapped_key_for_key(Inputs::Keyboard::Key key) {
|
||||
|
||||
// Virtual keys follow.
|
||||
BIND(Backspace, KeyDelete);
|
||||
BIND(Escape, KeyBreak);
|
||||
}
|
||||
#undef BIND
|
||||
return KeyboardMachine::MappedMachine::KeyNotMapped;
|
||||
|
@ -26,6 +26,7 @@ enum Key: uint16_t {
|
||||
|
||||
// Add some virtual keys; these do not exist on a real ZX80 or ZX81. They're just a convenience.
|
||||
KeyDelete = 0x0801,
|
||||
KeyBreak = 0x0802,
|
||||
};
|
||||
|
||||
struct KeyboardMapper: public KeyboardMachine::MappedMachine::KeyboardMapper {
|
||||
|
@ -359,6 +359,12 @@ template<bool is_zx81> class ConcreteMachine:
|
||||
set_key_state(KeyShift, is_pressed);
|
||||
set_key_state(Key0, is_pressed);
|
||||
break;
|
||||
|
||||
case KeyBreak:
|
||||
// Map break to shift+space.
|
||||
set_key_state(KeyShift, is_pressed);
|
||||
set_key_state(KeySpace, is_pressed);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if(is_pressed)
|
||||
|
Loading…
Reference in New Issue
Block a user