I do not think that IMEs are designed for this kind of task. Their concept is to allow the user to introduce a standardized method so that it can be used in several applications from different vendors.
My strategy will be similar to what you think:
- Do not show soft keyboard,
- intercept the menu button button to display your own,
- add a custom layout (possibly a
GridView or TableView inside a RelativeLayout with lower gravity) - use
OnItemClickListener - send the required
KeyEvent to the root of the View . If characters are thought up, KeyCodes don't even need to bind to an ASCII character. You just intercept the code and use it as you wish.
Sorry, I canβt give you the option as you requested, but this alternative does not seem to be much more than creating a whole new IME.
Edit : When reading a related question, it makes sense to use android.inputmethodservice.KeyboardView instead of reinventing the wheel with a GridView .
source share