How do i make my code so that it detects a keypress for anything other than the key "1"?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DieFault

Currently i have no idea how to implement “input is not 1”

:bust_in_silhouette: Reply From: Yuminous

In func _unhandled_input(event): or func _input(event):

if event is InputEventKey and event.scancode != KEY_1:
	# do stuff! :)

That’s cool! Didn’t know it was that easy without input maps!

Snail0259 | 2021-07-11 11:33

Thanks a lot!

DieFault | 2021-07-12 15:21