diff --git a/scripts/layouts/parser_kle.gd b/scripts/layouts/parser_kle.gd index 5cae147..625bf97 100644 --- a/scripts/layouts/parser_kle.gd +++ b/scripts/layouts/parser_kle.gd @@ -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