Well, . . .
You could do it purely in mechanical hardware. Look at an old 5 line
office phone, or an old car radio (sorry, Jay) with pushbuttons.
Or, . . .
you could do it entirely in software, using a junk PC.
Rip the tops off of all of the keys except the numerals.
NXT2: MOV AH,0
INT 16h
; Your most recent key is in AX (ASCII in AL, scanciode in AH)
. . .
JMP NXT2
If you want a multi-megabyte solution, you could use the "radio buttons"
in WINDOZE.
But you'd probably rather do it with relays