Skip to content

Conversation

@nullcoder
Copy link
Owner

Summary

  • Implements global keyboard shortcuts functionality for improved user experience
  • Adds comprehensive help dialog to discover available shortcuts
  • Integrates keyboard shortcuts throughout the application

Changes

New Components

  • KeyboardShortcutsHelp: Help dialog displaying all available shortcuts with platform-specific key formatting
  • KeyboardShortcut: Utility component for consistent keyboard key rendering
  • Separator: Added from shadcn/ui for visual separation in the help dialog

New Hooks

  • useGlobalShortcuts: Custom hook managing global keyboard event listeners with platform detection
  • Supports common shortcuts: Save (Cmd/Ctrl+S), Submit (Cmd/Ctrl+Enter), Help (Cmd/Ctrl+?), Escape
  • Includes platform-specific key detection and formatting

Integration

  • Integrated keyboard shortcuts help in the Header component (accessible via Cmd/Ctrl+?)
  • Added keyboard shortcuts icon and menu item in mobile navigation
  • Created demo page showcasing keyboard shortcuts functionality

Dependencies

  • Added @radix-ui/react-separator for the Separator component

Test Plan

  • Keyboard shortcuts work correctly on different platforms (Mac/Windows/Linux)
  • Help dialog opens with Cmd/Ctrl+?
  • Platform-specific keys are displayed correctly (⌘ on Mac, Ctrl on others)
  • Shortcuts can be enabled/disabled programmatically
  • All tests pass for useGlobalShortcuts hook
  • All tests pass for KeyboardShortcutsHelp component
  • Demo page demonstrates all functionality
  • Mobile navigation includes keyboard shortcuts option
  • Escape key closes the help dialog

Closes #72

🤖 Generated with Claude Code

nullcoder and others added 2 commits June 7, 2025 10:16
- Add useGlobalShortcuts hook for managing keyboard shortcuts - Implement KeyboardShortcutsHelp component with help dialog - Add Separator component from shadcn/ui - Integrate keyboard shortcuts help in Header (Cmd+/ to open) - Add comprehensive tests for keyboard shortcuts functionality - Create demo page for keyboard shortcuts Keyboard shortcuts implemented: - Cmd/Ctrl + / : Open help dialog - Cmd/Ctrl + K : Create new gist (navigation) - Cmd/Ctrl + S : Save gist (when applicable) - Cmd/Ctrl + Shift + C : Copy share link - Escape : Close modals/dialogs 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 7, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
ghostpaste 485523b Visit preview Jun 07 2025, 05:22 PM
@nullcoder nullcoder merged commit 4d751c2 into main Jun 7, 2025
1 check was pending
@nullcoder nullcoder deleted the feat/keyboard-shortcuts branch June 7, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants