Expand description
Keyboard related functions to be used with web-sys.
Requires “web-sys” feature to be enabled.
Functions§
- map_
combined_ keys - Returns Spectrum keymap flags with some bits set corresponding to the provided
keycode if the provided key matches one or more of the Spectrum keys. - map_
direct_ key - Returns Spectrum keymap flags with a single bit set corresponding to the provided
keycode if the key matches one of the Spectrum’s. - map_
key_ to_ direction - Returns joystick direction flags with a single direction bit set if a
keyis one of ← → ↑ ↓ keys. - map_
keypad_ key - Returns a keypad’s keymap flags with a single bit set corresponding to the provided
keycode if the key matches one of the Spectrum 128k keypad’s. - update_
joystick_ from_ key_ event - Updates the state of the joystick device via JoystickInterface from a key down or up event.
- update_
keymap - Returns an updated Spectrum keymap state from a
keydown or up event. - update_
keymap_ with_ event - Returns an updated Spectrum keymap state from a
keydown or up event. - update_
keypad_ keys - Returns an updated keypad’s keymap state from a key down or up event.
- update_
keypad_ keys_ with_ event - Returns an updated keypad keymap state from a key down or up event.