This is my sample custom keyboard application in Android that is programmed through Basic4android. This app contains number in the keyboard and its up to you to customize them.
Note: You can touch and hold a field to select all characters. Ant cursor movement will deselect them. A backspace will delete them.