Does Android have keyboard listener to detect which key is pressed?
问题 I want to recognize which key on the keyboard is pressed in Android. I have searched a lot but I haven't reached to correct answer yet. Some posts in StackOverflow that I have seen them but they don't answer me are here: How to listen the keypress in the soft keyboard? Android - Get keyboard key press how to find which key is pressed in android? 回答1: You can use the TextWatcher api provided by Android. Here a code snippet from one of the answer: field1.addTextChangedListener(new TextWatcher()