atorch / probability_puzzles

Android App
GNU General Public License v3.0
36 stars 5 forks source link

Use custom keyboard layout for entering expressions #23

Open rillig opened 2 years ago

rillig commented 2 years ago

In the input field for the mathematical expressions, only very few characters are useful:

The default keyboard layout depends on the input language. These layouts are tailored towards typing text, not mathematical expressions. Since the screen space on small screens is scarce, for entering a mathematical expression, the user has to constantly switch between different keyboard layers: the text layer for C, e and pi; the numeric layer for the digits and operators, the special symbol layer for the operator ^.

In right-to-left writing systems, the parentheses on the default on-screen keyboard may point in the "wrong" direction, see https://github.com/atorch/probability_puzzles/pull/21. The custom keyboard layout suggested here would always write the parentheses in left-to-right direction mode, avoiding this problem.

On Stack Overflow, there is an easy to follow recipe on adding a custom keyboard layout. That article assumes that a single layout fits all screen sizes.