If I understand you correctly take a look at the DynamicKeypad example.
File --> Examples --> Keypad --> DynamicKeypad:
|| @description
|| | This is a demonstration of keypadEvents. It's used to switch between keymaps
|| | while using only one keypad.
It's like your phone switching between one keypad with numbers, another with letters, and yet another with symbols.