This document describes the touch-tone encoding scheme used by FramerD.In brief, touch-tone encoding is to the practice of assigning to each of the letters of the alphabet a position on the 3x3 keypad of a telephone. Since the positions of these letters vary from country to country, we document those used in FramerD here.
This table represents the standard US assignment of letters to numbers, and is the assignment used in FramerD:
1 | 2 ABC |
3 DEF |
4 GHI |
5 JKL |
6 MNO |
7 PQRS |
8 TUV |
9 WXYZ |
This source code excerpt is the actual mapping table (from the low 7-bit ASCII range to integers) used in FramerD to implement the Touch-tone encoding. This code can be found in src/os/network.c.
/** TT (Touch-tone) encoding **/ static char tt_codes[128]= {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1, -1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6, 7,7,7,7,8,8,8,9,9,9,9,-1,-1,-1,-1,-1, -1,2,2,2,3,3,3,4,4,4,5,5,5,6,6,6, 7,7,7,7,8,8,8,9,9,9,9,-1,-1,-1,-1,-1};