This is an on-canvas menu with keyboard selection of items and nested levels.

Control with arrow-keys or Tab/Shift+Tab and select with Enter.

Menu items perform actions, which are defined in callbacks when setting up the menu structure.