mtd/keybind_screen.gd
2023-11-09 17:56:08 +11:00

16 lines
355 B
GDScript

extends Control
signal event_detected(event: InputEvent)
var found_event = false
func _input(event: InputEvent) -> void:
if found_event:
return
if event is InputEventKey or event is InputEventMouseButton or event is InputEventJoypadButton:
get_viewport().set_input_as_handled()
found_event = true
event_detected.emit(event)
queue_free()