Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | Ol_Smaug | |
Old Version | Published before Godot 3 was released. |
In my application, I added some code to look for the Alt key to be pressed, but it did not seem to work by checking for a scancode equal to KEY_ALT.
So, I checked the scancode on the event, and when I press my Alt key it is being reported as KEY_MENU instead of KEY_ALT. And if I press the Menu key on my keyboard, it reports as KEY_UNKNOWN. I tried a different keyboard to make sure it wasn’t just mine and it does the same thing.
Can someone else attempt to recreate this so I can confirm it’s not just an issue on my end? Thanks!
func _input(event):
if (event.type == InputEvent.KEY):
print(event.scancode)
I get 16777262 (KEY_MENU) when I press Alt, and 33554431 (KEY_UNKNOWN) when I press the Menu key.
Share the script you used to the tests would help a bit.
genete | 2016-08-30 21:57
I updated my post with some more details.
Ol_Smaug | 2016-08-30 22:28