I want to press "?123" key programmatically. But I don't know the KEYCODE for this symbol. And I also unable to find it. Can anybody know the KEYCODE for "?123" symbol on Soft Keyboard.
Asked
Active
Viewed 1,764 times
1
-
1I doubt that there is any keycode for that. AFAIK, it is not a key, but merely a key-shaped button to switch the soft keyboard into showing another set of keys. Not every soft keyboard will have this button, as they might use other things (e.g., gestures) to switch between key sets. – CommonsWare Mar 08 '16 at 13:16
-
Thanks for your reply. I want to show "numeric with symbols" keyboard first instead of "alphabetic" keyboard, when tapped on EditText. – Mohit Chauhan Mar 09 '16 at 13:38
2 Answers
2
It's not an actual key press.
It's just a way for the user to change the keyboard layout to be able to press on symbols etc.
I think it's not even a guarantee that every keyboard has it. There are many custom keyboards on Android and they can make it any way they want it.
You should think for yourself, what are you actually trying to achieve? to insert a "#" for example? then you should just simulate the keycode for that.

Ivo
- 18,659
- 2
- 23
- 35
-
Thanks for your response. I don't have to press any key by programmatically but I want to show "numeric with symbols" keyboard first instead of "alphabetic" keyboard, when tapped on EditText. – Mohit Chauhan Mar 09 '16 at 13:34
-
@MA13 aah, that usually has to do with the inputType but I think you can only use it to get numbers only. I believe what you want to ask can be found on http://stackoverflow.com/questions/25219855/how-to-show-android-keyboard-with-symbols-mode-by-default – Ivo Mar 09 '16 at 13:40
-
Ya, custom keyboard or the hack which you shared in the above link are the last options for me. it seems like Google's Android doesn't provide any way to this from APIs. – Mohit Chauhan Mar 10 '16 at 11:01
1
If you want to customize at this point, I think you should create a input method from the beginning, with your own keyboard class and own keyboardView. This way you can do whatever you want in the keyboard.

Community
- 1
- 1

Alexandre J
- 21
- 6
-
Thanks for your response. But this is the last option for me to achieve this. – Mohit Chauhan Mar 10 '16 at 11:03