I’ve got a TextArea, that is supposed to send something when a button is hit (easy peasy) or shift+return/enter is pressed… now… I know that I gotta use the event.current features to get when a user is pressing return whilst in a textarea… and I have it like this:
Event e = Event.current;
if (e.type == EventType.KeyDown && e.keyCode == KeyCode.Return)
{
enterPressed = true;
}
so i believe I would have to use the event again, but there is no event that checks if the current key is held down, instead of being pressed to “create” the event itself…
help?
There are certain key combinations that work in the build but not in the editor. For example, certain key combinations with the “Ctrl” modifier like Ctrl+Z won’t work if you’re testing inside the editor, but they will work when you build the game. I don’t think “Shift” falls in this category, but it might be worth checking.
Also, it might be helpful to print out the event information outside of the if statement: