How to detect character key presses?
问题 I know how to listen for when the ENTER button is pressed in a TextView, as shown in the code below: textView.setOnKeyListener(new View.OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_ENTER)) { enterPressed(); return true; } return false; } }); However... how do I listen for when a character key (A-Z, 0-9, special characters, etc.), basically everything else other than ENTER, BACKSPACE