Is there any reason you need to use a Label
node rather than a LineEdit
node?
Otherwise, you should be able to use OS.get_scancode_string( s )
where 's' will be the result of event.scancode
. You would also want to keep the string you're creating in a global var, with your input handling appending letters to the string. You would also want to check if the input is pressed, and somehow check for only alphanumeric key inputs.
var inputstr = "" setget _set_inputstr
func _input(event):
if event.type == InputEvent.KEY and event.pressed:
var s = OS.get_scancode_string( event.scancode )
self.inputstr = self.inputstr + s
func _set_inputstr( what ):
inputstr = what
get_node("Label").set_text( inputstr )