Search code examples
javaandroidkeyboardhotkeys

Can I Add "Ctrl" key to my custom android keyboard?


I built an android keyboard with working shift ,enter and spacebar keys but I can't add a ctrl key to my keyboard .


Solution

  • I personally have not done this, But I think you can simulate CTRL key by sending proper codes. for Example CTRL-A to CTRL-Z and come other have standard ASCII codes as listed here. It should solve most of your problems even though it does not cover up everything.

    In addition, I should say that there is already an app which provides a full keyboard with CTRL key on it called Hacker's Keyboard and it seems to be open source. You may be able to use it to learned how to do this.