mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Corrects some deficiencies in Vic-20 keyboard mapping.
... albeit without yet being clear on the wiring behind restore.
This commit is contained in:
parent
78ee46270b
commit
4f289ab10b
@ -61,6 +61,12 @@ uint16_t KeyboardMapper::mapped_key_for_key(Inputs::Keyboard::Key key) {
|
||||
BIND(Enter, KeyReturn);
|
||||
BIND(Space, KeySpace);
|
||||
BIND(BackSpace, KeyDelete);
|
||||
|
||||
BIND(Escape, KeyRunStop);
|
||||
BIND(F1, KeyF1);
|
||||
BIND(F3, KeyF3);
|
||||
BIND(F5, KeyF5);
|
||||
BIND(F7, KeyF7);
|
||||
}
|
||||
#undef BIND
|
||||
return KeyboardMachine::Machine::KeyNotMapped;
|
||||
|
@ -111,11 +111,15 @@ class KeyboardVIA: public MOS::MOS6522::IRQDelegatePortHandler {
|
||||
|
||||
/// Sets whether @c key @c is_pressed.
|
||||
void set_key_state(uint16_t key, bool is_pressed) {
|
||||
if(key == KeyRestore) {
|
||||
// TODO: how is restore wired?
|
||||
} else {
|
||||
if(is_pressed)
|
||||
columns_[key & 7] &= ~(key >> 3);
|
||||
else
|
||||
columns_[key & 7] |= (key >> 3);
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets all keys as unpressed.
|
||||
void clear_all_keys() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user