Better ways to type on a <5% Keyboard
When was the last time you enjoyed typing down what you wanted on a TV with nothing but a remote? All the solutions to speeden up text input on such devices are mostly a voice recognision alternative, or something like a gaze-based detection of input.
Is there a way to make typing efficient on a consumer remote that has nothing more than navigation buttons?
Theoretically how could you possibly reduce the number of keystrokes to type a single character while still maintaining the keystrokes/available-keys ratio, while still not going up high the learning curve? Employing a decision-tree based input method might help here.
For the sake of simplicity, let us assume that we still retain our existing QWERTY keyboard with 4 rows, (alphabets and numbers, symbols excluded). And that the first keystroke is spent to select one among those 4 rows.
If we allow a maximum choice of 12 inputs from a single row, that covers most of
the punctuation used in English— :;<,>.?/_-+={}[]"'?/. 12, because it is a
factor of 4, and each of the arrow keys could easily be assigned a equal number
of characters.
So the second input narrows the selection down to 3 adjacent characters, and the third input could finalize the choice of the key pressed. Sounds good, but how well does this fare?
By the standards of the metric we just invented (totally scientific!), we map 45 characters to 4 keys to a combination of 3 keystrokes.
We want efficiency to decrease if either:
- The average keystrokes per character is high
- The keyboard is too small for the number of characters
For our case, we could assume that the average number of keystrokes is a function of base-k logarithm, where k is the total number of keys in the keyboard.
\[[ K_\text{avg} = \lceil \log_{N_\text{keys}} N_\text{chars} \rceil ]\]So it could mean a keyboard like this, although there’s a lot of room for improvement in terms of the overlay:
Comparison to TV input
It is not trivial to calculate the number of keystrokes required on the normal modes of input, like the one that’s used in most modern televisions, but it could be approximated based on the following assumptions:
- Diagonal movement not allowed, only 4 directional
- QWERTY keyboard is used
- The keyboard position remains at the point of last input
Based on the above assumptions, a Python script could be written to calculate the keystrokes taken on a TV input:
from collections import deque
layout = [
list("1234567890"),
list("qwertyuiop"),
list("asdfghjkl"),
list("zxcvbnm")
]
# build position map
pos = {}
for r in range(len(layout)):
for c in range(len(layout[r])):
pos[layout[r][c]] = (r, c)
def bfs_distance(a, b):
"""True snap-path cost between two keys"""
if a == b:
return 0
sr, sc = pos[a]
tr, tc = pos[b]
q = deque([(sr, sc, 0)])
visited = set()
while q:
r, c, d = q.popleft()
if (r, c) == (tr, tc):
return d
if (r, c) in visited:
continue
visited.add((r, c))
for dr, dc in [(-1,0),(1,0),(0,-1),(0,1)]:
nr, nc = r + dr, c + dc
if 0 <= nr < len(layout) and 0 <= nc < len(layout[nr]):
if layout[nr][nc] != " ":
q.append((nr, nc, d + 1))
return float("inf")
def keystrokes_tv(text, start='a'):
text = text.lower()
current = start
total = 0
for ch in text:
if ch not in pos:
continue
total += bfs_distance(current, ch)
total += 1
current = ch
return total
Being at a loss for a potential dataset to compare the new decision-tree based system to the existing methods, I instead compare both of them with the amount of keystrokes required to type out some of the most popular YouTube searches from the previous decade. The efficiency of the new method is very obvious with longer queries, although this would not be that useful since it is only needed to type out the first few characters of a word with the advent of predictive completion system.
Notable difference still exist at smaller words:
| Search Term | Keystrokes | New Algorithm | Percentage Decrease |
|---|---|---|---|
| BTS | 14 | 9 | 35.71% |
| pewdiepie | 54 | 27 | 50.00% |
| ASMR | 16 | 12 | 25.00% |
| Billie Eilish | 51 | 39 | 23.53% |
| baby shark | 50 | 30 | 40.00% |
| old town road | 67 | 39 | 41.79% |
| music | 34 | 15 | 55.88% |
| badabun | 33 | 21 | 36.36% |
| blackpink | 48 | 27 | 43.75% |
| Fortnite | 35 | 24 | 31.43% |
| Minecraft | 42 | 27 | 35.71% |
| pewdiepie vs t series | 91 | 63 | 30.77% |
| peliculas completas en español | 156 | 90 | 42.31% |
| senorita | 38 | 24 | 36.84% |
| Ariana grande | 61 | 39 | 36.07% |
| alan walker | 56 | 33 | 41.07% |
| tik tok | 25 | 21 | 16.00% |
| musica | 38 | 18 | 52.63% |
| WWE | 6 | 9 | -50.00% |
| Calma | 29 | 15 | 48.28% |
| bad bunny | 32 | 27 | 15.62% |
| Eminem | 33 | 18 | 45.45% |
| queen | 21 | 15 | 28.57% |
| ed Sheeran | 33 | 30 | 9.09% |
| Peppa pig | 58 | 27 | 53.45% |
| despacito | 50 | 27 | 46.00% |
| la rosa de Guadalupe | 92 | 60 | 34.78% |
| Taki Taki | 42 | 27 | 35.71% |
| Enes Batur | 43 | 30 | 30.23% |
| Michael Jackson | 86 | 45 | 47.67% |
| songs | 24 | 15 | 37.50% |
| t series | 30 | 24 | 20.00% |
| maluma | 40 | 18 | 55.00% |
| bad guy | 24 | 21 | 12.50% |
| markiplier | 46 | 30 | 34.78% |
| Taylor swift | 54 | 36 | 33.33% |
| Ozuna | 41 | 15 | 63.41% |
| nightcore | 44 | 27 | 38.64% |
| Paulo Londra | 59 | 36 | 38.98% |
| karaoke | 46 | 21 | 54.35% |
| James Charles | 69 | 39 | 43.48% |
| youtube | 30 | 21 | 30.00% |
| imagine dragons | 75 | 45 | 40.00% |
| dance monkey | 53 | 36 | 32.08% |
| twice | 28 | 15 | 46.43% |
| Roblox | 36 | 18 | 50.00% |
| free fire | 25 | 27 | -8.00% |
| gacha life | 46 | 30 | 34.78% |
| post-Malone | 63 | 33 | 47.62% |
| Justin Bieber | 56 | 39 | 30.36% |
| Felipe Neto | 49 | 33 | 32.65% |
| Bruno mars | 46 | 30 | 34.78% |
| 7 rings | 31 | 21 | 32.26% |
| china | 25 | 15 | 40.00% |
| Doraemon | 44 | 24 | 45.45% |
| anuel | 25 | 15 | 40.00% |
| kill this love | 57 | 42 | 26.32% |
| jacksepticeye | 72 | 39 | 45.83% |
| maroon 5 | 39 | 24 | 38.46% |
| Joe Rogan | 44 | 27 | 38.64% |
| game of thrones | 70 | 45 | 35.71% |
| marshmello | 51 | 30 | 41.18% |
| Linkin park | 57 | 33 | 42.11% |
| David dobrik | 52 | 36 | 30.77% |
| bohemian rhapsody | 108 | 51 | 52.78% |
| squeeze | 28 | 21 | 25.00% |
| lady gaga | 44 | 27 | 38.64% |
| aaj tak live | 43 | 36 | 16.28% |
| 5-minute crafts | 56 | 45 | 19.64% |
| cardi b | 29 | 21 | 27.59% |
| geo news live | 54 | 39 | 27.78% |
| Selena Gomez | 62 | 36 | 41.94% |
| Coldplay | 50 | 24 | 52.00% |
| dantdm | 27 | 18 | 33.33% |
| lofi | 24 | 12 | 50.00% |
| anuel aa | 35 | 24 | 31.43% |
| Rihanna | 35 | 21 | 40.00% |
| drake | 26 | 15 | 42.31% |
| dross | 22 | 15 | 31.82% |
| Los polinesios | 70 | 42 | 40.00% |
| rap | 21 | 9 | 57.14% |
| Shawn Mendes | 48 | 36 | 25.00% |
| cocomelon | 59 | 27 | 54.24% |
| sia | 19 | 9 | 52.63% |
| song | 20 | 12 | 40.00% |
| slime | 24 | 15 | 37.50% |
| dua lipa | 43 | 24 | 44.19% |
| con Calma | 48 | 27 | 43.75% |
| funny videos | 54 | 36 | 33.33% |
| mikecrack | 44 | 27 | 38.64% |
| vegetta777 | 38 | 30 | 21.05% |
| pubg | 22 | 12 | 45.45% |
| avengers endgame | 66 | 48 | 27.27% |
| movies | 37 | 18 | 51.35% |
| soolking | 26 | 24 | 7.69% |
| believer | 38 | 24 | 36.84% |
| GTA 5 | 20 | 15 | 25.00% |
| Romeo Santos | 66 | 36 | 45.45% |
| Katy perry | 43 | 30 | 30.23% |
The code used for these calculations can be found here.