[Q] Keyboard Key/Button Operated Derma instead of clicking

All of these derma menus are great with lots of actions like clicking, scrolling, checking boxes but they kill the fast paced action.

I went through some derma tutorials and gmod wiki to make it on my own and searched this forum to find a similar menu but everything I did was in vain.

The menu will be shop and it’s structure will be like this

    Human Shop
1. Weapons Shop
2. Perks Shop
3. Food Shop
4. Buy Cure [1000]
5. Buy RPG [200]
6. Buy volvo [3000]
7. Buy Emma Waston [99999]
8. Class Menu
9. Admin Menu
ESC. Exit

The menu will spawn over chat and stay there until a purchase has been made, player is killed or player pressed ESC to exit(ESC should close the shop instead of opening game menu if shop is open ).( Instead of ESC the button opening the shop may close it as well.)
If player presses a key from 1-9 should do the action assigned to it and close the menu(number keys may work differently while the shop is closed and when shop is open they must be overwritten as long as the shop is open )

Example of how shop menu should work:

  • Player presses “Q” to open Shop menu
  • Player presses “1” to open Weapons menu(This should close the old menu)
  • Players presses “ESC” or “Q” to close Weapons menu
  • Player presses “Q” to open Shop menu
  • Player presses “3” to open Food shop
  • Player presses “1” to buy an apple.(This closes the menu, gives player an apple and removes 100 points from the player)

I don’t want you to code the menu for me. But feel free to share code snippets which explains me how to do number button pressing to interact, how to open/close menu on key press etc.

Any kind of help is greatly appreciated.