forked from funnymemellama/funnymemellama
16 lines
269 B
GDScript3
16 lines
269 B
GDScript3
|
extends Label
|
||
|
|
||
|
var keys = []
|
||
|
|
||
|
func _input(event):
|
||
|
if event is InputEventKey:
|
||
|
var key = OS.get_keycode_string(event.key_label)
|
||
|
if event.pressed:
|
||
|
if not keys.has(key):
|
||
|
keys.append(key)
|
||
|
else:
|
||
|
if keys.has(key):
|
||
|
keys.erase(key)
|
||
|
|
||
|
text = ' '.join(keys)
|