Textfield and Keyboard Event

I have been reading for about an hour online with no solution, if you are typing in a text field, you seem to not be able to read if the “enter” key is pressed, exmaple attached.

any ideas?