onSelect and onDeselect of InputField unreliable

I’m trying to use these functions to freeze player movement while typing but theyre only being called a fraction of the times I focus/unfocus it. What’s up with that? Has anyone else had this issue and how did you get around it? I think it’s because I’m using Enter to select the input field and Enter again to deselect it, it seems to work okay if I click it but that’s not how my game works. What can I do? I’ve tried adding ActivateInputField and DeactivateInputField on Enter presses but that doesn’t solve the problem either.