Noel,
"I don't see dig1a being in the case of a key in the 10-19 range."
Let me be more clear. If, for example, button 15 is pushed, flag1 stores the value 15 (0F). Then the conversion routine splits that up so that dig1a stores a 1 and dig1b stores a 5. Is that what you were getting at?
By the way, these are good suggestions which I will try early next week as I don't have my box with me right now.
Steve