-->

Android: What is the KeyEvent.KEYCODE for “?123” k

2019-05-29 19:34发布

问题:

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.

回答1:

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.



回答2:

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.

How to make a Android custom keyboard?