If you have just four or five discrete buttons, it isn’t terribly difficult, but if you have a 12- or 16-keypad matrix ... dividers depending on which key is pressed, and read the resulting ...