Advise for a Controlling-Hint-System (keyboard or Controller Input) / How to get Controller Input

Godot Version

4.3

Question

My game is in it’s finally phase. A classic 2D Platformer. It supports Controller and keyboard Inputs.

I already build a hint-system. It’s a folding in textbox.
(like i the picture below)

Also the Game has 2 languages, so my code to import the relevant-keys look like this

var jump_key:String = "Space"
var attack_key:String = "Q"
var sprint_key:String = "SHIFT"

func display_conlling_hint(display_time:float, update:Hint_Typs):
       funtion_to_translate_key_languages() #"space" -> "Leerzeichen"
	match update:
		Hint_Typs.SPRINT:
			hint_label.text = tr("HINT_SPRINT") % [sprint_key]
		Hint_Typs.ATTACK:
			hint_label.text = tr("HINT_ATTACK") % [attack_key]
		Hint_Typs.JUMP:
			hint_label.text = tr("HINT_JUMP") % [jump_key]


   tween starts with the correct hint

Now do you have advice, how to check if the player uses a Controller (and which one) to adjust, for example, the Jump-Key for “space” to “X” or “A”

The only way i can think off, ask the player in the boot-up screen if and which Controller he uses.
But maybe you know a more elegant way

Any Idea is welcome
and thank you

If you are looking for support its better to put this post in the help-category