Share My Creation Custom Keyboard Creator & Interface


Well-Known Member
Licensed User
In another post I attached a sample app showing how to create a custom
keyboard and control the input to it so that it looked and acted like a regular
EditText view.

Attached is the code for a sample app which has a lot more features.
Although the EditTexts are set to INPUT_TYPE = NONE so that the Android
keyboard never shows, this code gives the appearance of typing directly
to EditTexts and emulates EditText features such as:

- supports multi-line EditTexts
- touch EditText to move cursor
- blinking cursor
- hold down Backspace to repeat deleting characters
- cursor left and right keys
- long touch on EditText to SelectAll
- active EditText has a highlighted frame

Additional features include:

- custom keyboard can contain whatever characters you want
- keys can be added to perform custom functions
- can limit input to the width of the EditText
- supports input larger than the EditText with the full text shown above
- Undo key

The second app (which is actually the first screenshot, below) has some
different features:

1) It does not have a label for each character in the EditTexts. This makes
the app simpler to create, but it does not allow for touching the field to move
the cursor to a particular spot; the left and right cursor keys allow moving
the cursor.

2) The keyboard is split into four parts, this allows a different arrangement
of the keyboard for landscape and portrait orientations.

3) Key images are provided for all the alphabet, upper and lower case, and
all the usual symbols found on keyboards, as well as the digits. This should
make it easier to create custom keyboards.

4) Fields can be right-justified as shown in the screenshot. This is primarily
of use for entering numbers or something like Hebrew. To add right-justification
to the first app, search the second app for the word "rightjustify"

These apps will not display properly on low-resolution devices ( < 800x480).
Since you will need to create your own keyboard anyway, you can make it
whatever size you need to fit on different devices and orientations. The
point of these apps is the code for interfacing with the keyboard. If you do
not have a high-res device, you can try it on an emulator.

I just noticed that the subject line is a little misleading. These apps do not
"create" custom keyboards, but they have what is needed plus instructions
for creating your own custom keyboards. All you have to do is add a Panel
(or multiple panels as in app #2), add an ImageView to the Panel(s) for each
keyboard key, and load the desired key image from the Files folder. Then you
need to modify the code to match your specific keyboard(s).

Note that it is presently not possible to create a custom keyboard in B4A and
make it the default keyboard in Android.



Last edited:


Active Member
Licensed User
Thank you for sharing, this will be very helpful for me.

I need some special keys and a Del Key (Forward Delete) in my custom keyboard and i guess, this will be no problem to implement.


Active Member
Licensed User
Note that it is presently not possible to create a custom keyboard in B4A and
make it the default keyboard in Android.
does this hold good even now? i want my custom keyboard to be shown in "select input methods" that appear when you are about to type something in ur phone.

Kindly let me know.