The problem is just like what I explained in Title. After InputField user input, all the other character(such as KeyCode.A, KeyCode.B, ... KeyCode.Z) input seems not working for GetKeyDown(), GetKeyUp(), GetKey(), while special keys works such as KeyCode.LeftArrow, KeyCode.Delete, etc.
void Update(){
// search shortcut with Enter key
if (Input.GetKeyDown(KeyCode.Return))
{
if (searchField.text.Trim() != "")
{
// do something
}
searchField.DeactivateInputField();
}
}
After some search, I found DeactivateInputField() function and I executed in the end of if statement to prevent it. But it seems helpful but sometimes not. I mean, after insert searchField.DeactivateInputField(); sometimes this problem doesn't occur, sometimes it occurs. I am lost..
I am guessing InputField event system is eating keys but only character keys.. I can't use Input.eatKeyPressOnTextFieldFocus because I'm using Unity5 and it is deprecated.
Any help?