It's a bit obscure, but this thread on Google groups provides the answer for a question mark:
KeyEvent.KEYCODE_SLASH, plus true for isShiftPressed()
I assume the same thing will work for an exclamation mark: KeyEvent.KEYCODE_1, plus true for isShiftPressed()
0
Grant Ojanen
On
Since ! and 1 are on the same key, you would want to check for the KeyEvent's Unicode Character not its key-code. This probably is a better way to catch the exclamation mark, because some keyboard layouts may not have ! and 1 on the same key.
It's a bit obscure, but this thread on Google groups provides the answer for a question mark:
I assume the same thing will work for an exclamation mark:
KeyEvent.KEYCODE_1
, plus true forisShiftPressed()