Trait spectrusty::peripherals::KeyboardInterface
source · pub trait KeyboardInterface {
fn get_key_state(&self) -> ZXKeyboardMap;
fn set_key_state(&mut self, keymap: ZXKeyboardMap);
}
Expand description
An interface for providing changes of a ZX Spectrum keyboard state to one of the ULA
chipset emulators.
This trait is implemented by ControlUnit implementations which provide a Spectrum’s keyboard interface.
Required Methods§
sourcefn get_key_state(&self) -> ZXKeyboardMap
fn get_key_state(&self) -> ZXKeyboardMap
Reads the current state of the keyboard.
sourcefn set_key_state(&mut self, keymap: ZXKeyboardMap)
fn set_key_state(&mut self, keymap: ZXKeyboardMap)
Sets the state of the keyboard.