Android: What is the KeyEvent.KEYCODE for “?123” key on soft keyboard?

China☆狼群 提交于 2019-12-08 05:22:51

问题


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?



来源:https://stackoverflow.com/questions/35868384/android-what-is-the-keyevent-keycode-for-123-key-on-soft-keyboard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!