keebie/scripts/key_props.gd

25 lines
472 B
GDScript

class_name KeyProps
var physical_keycode: Key
var location: KeyLocation
var main_char: String
var shift_char: String
var alt_char: String
var alt_shift_char: String
var width_ratio_init: float
var width_ratio: float
func _init(
_physical_keycode: Key,
_width_ratio: float = 1,
_location: KeyLocation = KEY_LOCATION_UNSPECIFIED
) -> void:
physical_keycode = _physical_keycode
location = _location
width_ratio_init = _width_ratio
width_ratio = width_ratio_init