Sayboard icon indicating copy to clipboard operation
Sayboard copied to clipboard

Feature Request: Recognize and replace word "keycode"/"key code" to enter Android keycodes

Open sudomain opened this issue 2 months ago • 2 comments

Hello,

First, thank you for the app. I only discovered it today on F-Droid, but I love it. I think this feature could add a lot of functionality and offer a workaround to some of the existing issues regarding entering numbers, #19 and punctuation, #14 :

When the user says the word(s) "keycode" or "key code" followed by the name of one of the Android keycodes, the corresponding key will be entered. For example, the user says: Alice has key code three apples The IME will input: Alice has 3 apples

This is flexible: If the user wants to have the word "three" instead of 3, they can just omit saying "key code".

This can enable:

  • Literal numbers with keycode one, keycode two, keycode three (1, 2, 3) ...
  • Literal punctuation with keycode comma, keycode period, keycode slash (, . /) ...
  • Text editing with keycode enter, keycode del
  • Android system navigation with keycode back, keycode home

And possibly (I haven't tested these in my other app that enter key codes):

  • Capitalizing with keycode caps lock, keycode shift

There are some benefits to this approach:

  1. Most of the existing keycodes are logically named and easy to learn (or guess)
  2. The same vosk model can be used and a separate punctuation model isn't necessary. Sayboard just intercepts and replaces when "key code ___" is said
  3. The words "keycode" and "key code" are unlikely to trigger false positives, unless the user happens to be dictating about the topic of keycodes.

There are IMEs that can enter the above keycodes, such as Hacker's keyboard and Key Mapper, but they can't do it with the vosk model sayboard provides.

sudomain avatar Apr 13 '24 18:04 sudomain