Skip to content

Add Keyboard Shortcuts Help Overlay #72

@adamstosho

Description

@adamstosho

Currently, players are not aware of the available keyboard shortcuts in the game. There's no way to discover keyboard controls without reading the source code or trying different keys randomly.

💡 Proposed Solution

Add a keyboard shortcuts help overlay that can be toggled with a key press (recommended: H key).

Features to Implement:

  1. Keyboard Shortcuts Overlay

    • Display all available keyboard shortcuts
    • Toggle on/off with H key
    • Modern, user-friendly UI that matches game aesthetics
    • Responsive design for mobile and desktop
  2. Additional Keyboard Shortcuts

    • Add M key to toggle mute/unmute sound
    • Add H key to toggle shortcuts help overlay

Current Keyboard Controls:

  • Space - Drop/stack blocks
  • R - Restart game

Proposed Keyboard Controls:

  • Space - Drop/stack blocks
  • R - Restart game
  • M - Mute/unmute ⭐ NEW
  • H - Toggle shortcuts help ⭐ NEW

🎨 UI/UX Design

  • Overlay should match the existing game UI theme
  • Centered modal with gradient background
  • List shortcuts with keyboard key badges (kbd elements)
  • Close button (×) or ESC key support
  • Smooth fade-in/fade-out animation

📱 Responsive Design

  • Mobile-friendly with appropriate font sizes
  • Touch-friendly close button
  • Proper spacing for readability

🧪 Testing Checklist

  • Overlay opens/closes with H key
  • M key toggles mute/unmute
  • Overlay displays all shortcuts correctly
  • Close button works
  • Works on mobile devices
  • Theme compatibility (if applicable)
  • No conflicts with existing keyboard shortcuts

🚀 Benefits

  1. Better User Experience: Players can easily discover keyboard shortcuts
  2. Accessibility: Improves game accessibility with documented controls
  3. Professional Polish: Adds a professional touch to the game
  4. Reduced Support: Fewer questions about keyboard controls

📝 Implementation Notes

  • Keep the overlay hidden by default
  • Use similar styling to the existing results overlay
  • Ensure the overlay doesn't interfere with gameplay
  • Consider adding the shortcuts to the README as well

🔗 Related

  • This feature improves discoverability of existing functionality
  • Enhances the overall user experience without changing core gameplay

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions