Hey folks,
I’m trying to write an avatar chat application where i require the arrow and enter keys to perform special functions, so I’d like to restrict their input to the message textfield. I tried using the ‘restrict’ property of the textfield object, but that didn’t work.
This is basically what I want it to do:
When a user types any alphanumeric character/punctuations into the textfield, textfield acts normal. but when the Enter key or arrow keys are pushed, i do not want them to register into the textfield (this textfield is multi-line, so I don’t want the Enter key to give me a carriage return, or the arrow keys to move the typing cursor). I’ve tried many ways but can’t seem to manipulate the default behaviour of the textfield Anyone have any tips and ideas?
Thanks for any help!
Jay