You are talking about a text entry system.
The system above is currently the most memory minimizing (I believe complexity is 75n + 1000 where n is input count.) and is thus the most optimized. At least, using a one counter pulse system is that complexity, IDK about other less optimized systems.