Skip to content

[FEATURE] Enable Keyboard Navigation for Audio Settings #404

@ikostan

Description

@ikostan

📄 Description

Enable full keyboard navigation support for the Audio Settings menu in SkyLockAssault.

Currently, interaction with audio controls (e.g., master volume, music volume, SFX volume, mute toggles, sliders, etc.) is primarily mouse-driven. This feature would allow users to:

  • Navigate between UI elements using keyboard inputs (e.g., arrow keys / Tab navigation)
  • Adjust sliders using keyboard controls
  • Toggle checkboxes using keyboard input
  • Visually highlight the currently focused control
  • Ensure proper focus behavior when the Audio Settings screen is opened

The goal is to make the Audio Settings menu fully operable without requiring a mouse.


🎯 Why is this useful?

1. Accessibility & UX Improvements

  • Improves usability for players who prefer keyboard-only interaction
  • Enhances accessibility for users who may not use a mouse
  • Creates a more consistent UI experience across all menus

2. Web Export & Platform Learning (Godot-Specific)

This is especially valuable for:

  • Learning how focus navigation works in Godot 4.x
  • Understanding FocusMode, focus_neighbor_*, and UI input propagation
  • Testing keyboard behavior in Godot Web exports, where mouse handling can differ slightly from desktop builds
  • Ensuring consistent UX across Windows, Linux, and Web platforms

Implementing keyboard navigation helps validate that the project’s UI architecture is platform-agnostic and scalable.

3. Controller Support Foundation

Well-defined keyboard focus navigation also lays groundwork for:

  • Gamepad / controller UI navigation
  • Future console compatibility considerations
  • Centralized input handling improvements

🛠 Proposed Implementation (Optional)

High-level implementation approach:

  1. Enable Focus on Interactive Controls

    • Set focus_mode = Control.FOCUS_ALL for:

      • Sliders (HSlider / VSlider)
      • CheckButtons
      • Buttons
    • Ensure controls are focusable via keyboard

  2. Configure Focus Neighbors

    • Define:

      • focus_neighbor_top
      • focus_neighbor_bottom
      • focus_neighbor_left
      • focus_neighbor_right
    • Ensure logical vertical navigation order

  3. Set Initial Focus

    • When AudioSettings scene is loaded, explicitly set focus to the first interactive element:

      first_control.grab_focus()
  4. Keyboard Slider Adjustments

    • Confirm left/right arrows adjust slider values
    • Ensure value changes trigger existing audio update signals
  5. Visual Feedback

    • Confirm visible focus highlight
    • Optionally improve theme styling for focused state
  6. Testing

    • Validate:

      • Desktop (Win10)
      • Linux (if applicable)
      • Web export
    • Ensure no focus trapping or skipped controls


🧩 Additional Context

  • This aligns with improving overall UI consistency across Settings menus.
  • Keyboard navigation should follow the same logical order as visual layout.
  • Changes should not interfere with existing mouse-based interaction.
  • No new input mappings are required; default Godot UI navigation inputs should be used.
  • Implementation should be minimal and scene-driven where possible, avoiding unnecessary script complexity.

This enhancement strengthens SkyLockAssault’s UI architecture, improves accessibility, and provides valuable hands-on experience with Godot’s focus system and cross-platform UI behavior.

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions