HI!
With Godot 4 the "set_scancode" method disappeared from the gdscript API.
It was used to create an event and eg populate the InputMap singleton:
func _on_create_preset_input_pressed(): var new_input = InputEventKey.new() new_input.set_scancode(KEY_W) InputMap.add_action("move_up") InputMap.action_add_event("move_up",new_input)
I can't see an obvious and straightforward way of doing this in Godot 4 (except maybe with instancing the event and setting directly the key property?).