Module web_sys

Module web_sys 

Source
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 key code 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 key code 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 key is one of ← → ↑ ↓ keys.
map_keypad_key
Returns a keypad’s keymap flags with a single bit set corresponding to the provided key code 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 key down or up event.
update_keymap_with_event
Returns an updated Spectrum keymap state from a key down 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.