![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | koba |
If is_pressed is true, you can get unicode. But if you keep pressing it, you’ll get the unicode continuously.
I wanted to get unicode only once on input, so I thought about getting unicode when is_pressed is not. But it gets the unicode with 0. I don’t know the cause. Is there a solution or other means?
func _unhandled_key_input(event):
if event.is_pressed():
print(event.unicode)
The unicode will be obtained by value.
func _unhandled_key_input(event):
if not event.is_pressed():
print(event.unicode)
The unicode will be obtained by 0.