add extra checks for kle iso section key

This commit is contained in:
Teatov 2025-08-02 08:19:59 +10:00
parent b6b0f45956
commit a17becae83

View File

@ -244,6 +244,16 @@ func _get_numpad_keycode_from_legend(legend: Array[String]) -> Key:
func _get_key_locations(key_pos_dicts: Dictionary[Key, Array]) -> void:
for keycode in key_pos_dicts:
var dicts := key_pos_dicts[keycode] as Array[Dictionary]
if (
keycode == KEY_NUMBERSIGN
and key_pos_dicts.has(KEY_BACKSLASH)
and key_pos_dicts[KEY_BACKSLASH][0][POS].x < dicts[0][POS].x
):
dicts[0][KEY_DICT][KeyProps.KEY] = KEY_BACKSLASH
key_pos_dicts[KEY_BACKSLASH][0][KEY_DICT][KeyProps.KEY] = KEY_SECTION
continue
if dicts.size() == 1:
continue
@ -269,5 +279,9 @@ func _get_key_locations(key_pos_dicts: Dictionary[Key, Array]) -> void:
key_pos_dict_right[KEY_DICT][KeyProps.KEY] = KEY_KP_ENTER
continue
if keycode == KEY_BACKSLASH:
key_pos_dict_left[KEY_DICT][KeyProps.KEY] = KEY_SECTION
continue
key_pos_dict_left[KEY_DICT][KeyProps.LOC] = KEY_LOCATION_LEFT
key_pos_dict_right[KEY_DICT][KeyProps.LOC] = KEY_LOCATION_RIGHT