A keycode cross translation.
Well this is a concept devised by myself, not actually me, I was inspired from the Keypad phones. I'll tell you how it works.
- In keypad phones, ABC are written on key 2. If we press 2 once then letter 'A' appears, and in the meantime if we press 2 again then it changes to 'B'. If it's pressed the third time it becomes 'C'.
- Similarly it's same for the all keys, also some extra characters are added which aren't from keypad but I developed them for convenience. eg. - and
blank space
. - Every letter is seperated by '-' character. The blank space between two words is said as
00
. - Characters which aren't in the list are removed.
This can be vice-versa for converting keycode to normal text.
ℹ️ Remember that keycode only returns CAPITALS and it also processes your normal text inputs as CAPITALS too (even if you give as lowercase).
Here's a list of all the characters :
Key | Value |
---|---|
A | 2 |
B | 22 |
C | 222 |
2 | 2222 |
D | 3 |
E | 33 |
F | 333 |
3 | 3333 |
G | 4 |
H | 44 |
I | 444 |
4 | 4444 |
J | 5 |
K | 55 |
L | 555 |
5 | 5555 |
M | 6 |
N | 66 |
O | 666 |
6 | 6666 |
P | 7 |
Q | 77 |
R | 777 |
S | 7777 |
7 | 77777 |
T | 8 |
U | 88 |
V | 888 |
8 | 8888 |
W | 9 |
X | 99 |
Y | 999 |
Z | 9999 |
9 | 99999 |
00 | |
. | 1 |
- | 11 |
You can run the project on your machine and see how it works