Problem: Arrow keys and space bar were not working due to a bug in the key_matches function.
Fix: Updated lib/tui/utils.py:
- Fixed
key_matchesto only usechr()for printable ASCII (32-126) - Properly handle special keys by their parsed names
- Arrow keys (259-261) now work correctly
Problem: ESC wasn't properly exiting and aborting workflows.
Fix: Updated lib/tui/unified_menu.py:
- Changed
run()to return exit codes (0 for success, 1 for cancel) - ESC now properly quits with cancel status
- Multiple ESC presses handled gracefully
Problem: When user pressed ESC in Fresh Install, the installation continued anyway.
Fix: Updated setup.sh:
fresh_install()now checks return code fromrun_configuration_wizard()- If user cancels (exit code != 0), the function returns immediately
- No more unwanted continuation to Ansible playbooks
Problem: Different menus used different TUI systems (MenuDialog, SelectionOverlay, etc.)
Fixes:
- Created
lib/tui/main_menu.py- Unified main menu with splash screen - Created
lib/tui/section_selector.py- Unified section selector for Modify Setup - Updated
show_ubootu_splash()to use unified main menu - Updated
modify_setup()to use unified section selector - All menus now use the same rendering engine
All menus now have:
- Same box drawing characters (single-line: ┌─┐)
- Same selection indicators ([X] for selected, [ ] for unselected)
- Same help bar at bottom
- Same navigation keys
- Same visual layout
- ↑/↓ Arrow Keys: Navigate up/down ✓
- ←/→ Arrow Keys: Back/Enter ✓
- h/j/k/l: Vim-style navigation ✓
- Space Bar: Toggle selection ✓
- Enter: Confirm/Enter submenu ✓
- A: Select all (in multi-select) ✓
- N: Deselect all (in multi-select) ✓
- ESC: Go back/Cancel ✓
- Q: Quit ✓
- H/?: Help ✓
- S: Save ✓
lib/tui/utils.py- Fixed key_matches functionlib/tui/unified_menu.py- Fixed exit codes and ESC handlingconfigure_standard_tui.py- Updated to use new exit codessetup.sh- Fixed fresh_install flow, updated menu calls- Created
lib/tui/main_menu.py- Unified main menu - Created
lib/tui/section_selector.py- Unified section selector
The Ubootu TUI now provides a 100% consistent user experience across all menus:
- All keys work on all screens
- All menus look identical
- ESC properly cancels and exits
- No more unexpected workflow continuations
- Professional, unified interface throughout
The user can now navigate confidently knowing that the same keys will work everywhere and ESC will always safely exit without unwanted side effects.