Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an on-screen numpad for use on any smartphone #159

Closed
sspanak opened this issue Jan 26, 2023 · 1 comment · Fixed by #231
Closed

Add an on-screen numpad for use on any smartphone #159

sspanak opened this issue Jan 26, 2023 · 1 comment · Fixed by #231
Assignees
Labels
enhancement New feature or request

Comments

@sspanak
Copy link
Owner

sspanak commented Jan 26, 2023

There is no good way of using Traditional T9 on a touchscreen-only device. So let's add an on-screen numpad to make it usable.

Settings screen

  • Change the "On-screen keys" option to toggle the soft numpad.
  • Rename it to "On-screen keypad"
  • Make it a dropdown with three options: "Disabled", "Control keys only", "Full-sized".

Design

The layout is similar to Gboard's GODAN.

===================================================
| suggestion | are | taller | like | in | Gboard |
===================================================
|    <    |  Clear  | Filter_ |    >    |
==================================================================================
|               |   1           |   2           |   3           |       ⌫       |
|              	|       ,.?!()  |       abc     |       def     |               |
+---------------+---------------+---------------+---------------+---------------+
|               |   4           |   5           |   6           |      OK       |
|               |       ghi     |       jkl     |       mno     |               |
+---------------+---------------+---------------+---------------+---------------+
|       ⚙      |   7           |   8           |   9           |      🪐       |
|               |       pqrs    |       tuv     |       wxyz    |               |
+---------------+---------------+---------------+---------------+---------------+
|  +Add word    |   *           |   0           |   #           | ⌨️ T9/ABC/123 |
|               |               |   ␣ / +%*{}   |               | ⇧ Shift       |
+---------------+---------------+---------------+---------------+---------------+


  • Suggestions row
    • Contains the suggestion list
    • Is as tall as in Gboard
  • Suggestion controls row
    • Button meanings: Previous suggestion | Clear stem filter | Set stem filter | Next suggestion
    • "Filter" is in bold+italic, but the underscore is not.
  • Left control column
    • Button meanings (bottom to top): Add Word, Show Settings
    • Consider putting only an icon for "Add Word".
    • Consider adding a "left arrow" for moving the cursor to the left. (after Add cursor moving by DPAD #157)
  • Right control column
    • Button meanings (bottom to top): Input Mode, Next Language, OK, backspace
    • When the mode changes, the letters on the numpad have their text case (or language) changed accordingly.
    • Consider adding a "right arrow" for moving the cursor to the right. (after Add cursor moving by DPAD #157)
  • Numpad
    • If there is enough room put the number on the left and the characters on the right. If not, put a small number in the upper left corner.
    • The character list could be centered or aligned to the right with some padding
    • 2-9:
      • First five characters for this key are displayed
      • Button text case changes according to the current state
    • 0 and 1:
      • Either display the first five or a meaningful hardcoded list
    • # and *: Just type the respective character
    • "Upside-Down Keypad" flips the number keys upside down.

Refactoring

  • Create a handlers directory inside ime.
    • ime/KeyPadHandler -> ime/input/KeyPadHandler
    • ime/SoftKeyHandler -> ime/input/SoftControlPadHandler
    • create `ime/input/SoftNumPadHandler

Second phase

These should probably become separate issues.

  • Vibrate on keypress
  • Suggestions row
    • Touching a suggestion selects it
    • Sliding, scrolls them - the RecyclerView supports it by default
  • Right control column
    • (Not sure about this yet) Input Mode shows the current mode: T9, ABC, abc or 123 (or maybe the next mode?).
    • (Not sure about this yet) Consider changing Input Mode icon and text to ⇧ Shift, when composing a word.
@sspanak sspanak added enhancement New feature or request maybe Nice to have, but not at all mandatory labels Jan 26, 2023
@sspanak sspanak changed the title Add a full on-screen keypad for use on any smartphone Add an on-screen numpad for use on any smartphone Jan 31, 2023
@sspanak sspanak removed the maybe Nice to have, but not at all mandatory label Mar 21, 2023
@sspanak sspanak self-assigned this Apr 6, 2023
@sspanak
Copy link
Owner Author

sspanak commented Apr 10, 2023

Took a slightly different approach with the layout and everything.

There remaining stuff is:

  • Restore the key inscriptions.
  • 123 mode does not work at all.
  • Verify the candidate colors look fine in the small main menu.
  • Verify the small menu is still working fine in general.
  • Pressing BACK must hide the keyboard, then when pressed one more time, navigate back. This is for consistency with other keyboards.
  • Update the documentation.
  • More meaningful icons or text for the control keys (Add word, mode, etc).
  • Add Move left/Move right will be done in Add cursor moving by DPAD #157

These will be done in #240:

  • In Numeric Mode: hide the "Next Language" key and show "," and ".".
  • Holding Backspace or 0-key does not work
  • Add suggestion control keys in a new row, right below the suggestion bar: Filter/Clear filter, Select Previous/Next (after Add cursor moving by DPAD #157, when there will be separate functions for filtering)
  • Vibration on key press (+ a setting)
  • Add proper support for the "upside-down keyboard" setting.
  • Add "Key Hints" Setting. When enabled, assigned hardware keys would be displayed above the software key icons (or labels)

@sspanak sspanak linked a pull request Apr 19, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant