Custom Input Methods

Input Parsers

An input parser examines characters entered by the user and if applicable changes them into different characters, according to its parsing rules. You normally use input parsers with the standard keyboard of your device to input characters for which there are no keys provided. For example, if the keyboard does not have keys for the German Umlaute ä, ö, and ü, a parser could be used to change the input sequences "a, "o, and "u into their respective Umlaute.

Parser rules are defined via simple rule files. The rules for the above example would be defined in the following way - for both upper and lower case Umlaute:

Each line in a rule file declares a translation from an input sequence into an output sequence. In this example, the output sequences are single characters, which is the normal case, but sequences can be used here as well. Both sequences have to be separated by a single tabulator. No other white space characters are allowed. The sequences themselves may not contain tabulators.

To make your parsing rules available in Babbletower, save the rules in a file with the ending .prs. Choose a short file name. The encoding of the file has to be in UTF8. Place the file in the ime directory, located in Babbletower's directory. When Babbletower starts up, it loads all .prs files contained in it and makes them available in the drop down list of the input method chooser.


In normal mode, the input parser keeps parsing and highlighting entered characters until Enter is hit. If the parser is used in autocomplete mode, it will only start highlighting entered text when it recognizes the beginning of a sequence defined in its rules. For the above example, the parser would start highlighting only when the character " is entered. It will stop highlighting the text when a non-ambiguous or no translation for the input sequence is found, e.g. if the next entered letter in our example is a, the parser would change the sequence "a into , and remove the highlighting.

If there were another rule starting with the same sequence, e.g. "aa , the parser would only change the entered "a, but not remove the highlighting. This is to show that there is a further alternative in the rule set. If now a second a is entered, the text will change from into , and the highlighting is removed. If the first alternative is what you want, hit Enter.

To activate autocomplete for a set of rules, the first line in a rules file has to consist of the word autocompelete. This mode is usually used with simple rules as in our example.

On-Screen Keyboards

The specification of this feature is still in development. The details will be made available once it has been finalized. Meanwhile, two sample keyboards are included to demonstrate this feature.

Back to top of manual