# Keyboard Shortcuts VidPly provides comprehensive keyboard navigation for accessibility and power users. All player controls can be accessed via keyboard shortcuts. ## Quick Reference | Key | Action | Description | |-----|--------|-------------| | Space, P, K | Play/Pause | Toggle video playback | | M | Mute/Unmute | Toggle audio mute with visual feedback | | F | Fullscreen | Toggle fullscreen mode | | | Seek Backward | Skip backward 10 seconds | | | Seek Forward | Skip forward 10 seconds | | | Volume Up | Increase volume by 10% | | | Volume Down | Decrease volume by 10% | | C | Captions Menu | Open captions/subtitles menu | | S | Speed Menu | Open playback speed menu | | Q | Quality Menu | Open quality selection menu | | J | Chapters Menu | Open chapters menu | | A | Caption Style Menu | Open caption styling options | | T | Transcript | Toggle transcript panel | | D | Drag Mode | Toggle drag mode for transcript/sign language | | R | Resize Mode | Toggle resize mode for transcript/sign language | | > (Shift+.) | Speed Up | Increase playback speed by 0.25x | | < (Shift+,) | Speed Down | Decrease playback speed by 0.25x | | Home | Reset Position | Reset transcript/sign language to center | | Esc | Close / Exit | Close menus, exit fullscreen, or exit drag/resize mode | ## Menu Navigation When any menu is open (captions, speed, quality, chapters, or caption style), you can navigate using: | Key | Action | |-----|--------| | / | Navigate between menu items | | Home | Jump to first menu item | | End | Jump to last menu item | | Enter / Space | Select current menu item | | Esc | Close menu | ## Detailed Controls ### Playback Controls - **Play/Pause** (Space, P, K) Toggles between play and pause states. Visual feedback shows the current state in the control bar. - **Seek Backward** () Skips backward 10 seconds in the video timeline. - **Seek Forward** () Skips forward 10 seconds in the video timeline. ### Audio Controls - **Mute/Unmute** (M) Toggles audio mute. The volume button icon changes to reflect the muted state. - **Volume Up** () Increases volume by 10%. Maximum volume is 100%. - **Volume Down** () Decreases volume by 10%. Minimum volume is 0%. ### Speed Controls - **Speed Up** (>) Increases playback speed by 0.25x (e.g., 1.0x → 1.25x → 1.5x). Maximum speed is typically 2x. - **Speed Down** (<) Decreases playback speed by 0.25x (e.g., 1.5x → 1.25x → 1.0x). Minimum speed is typically 0.25x. - **Speed Menu** (S) Opens the speed selection menu with preset speed options. The currently active speed is auto-focused. ### Caption Controls - **Captions Menu** (C) Opens the captions/subtitles menu to select or disable caption tracks. The active track is auto-focused. - **Caption Style Menu** (A) Opens the caption styling options (font size, color, background, etc.). The first style option is auto-focused. ### View Controls - **Fullscreen** (F) Toggles fullscreen mode. Press F or Esc to exit fullscreen. - **Quality Menu** (Q) Opens the quality selection menu for videos with multiple quality levels. The active quality is auto-focused. - **Chapters Menu** (J) Opens the chapters menu if the video has chapter markers. The active chapter is auto-focused. - **Transcript Toggle** (T) Shows or hides the interactive transcript panel (if available). - **Drag Mode** (D) Toggles keyboard drag mode for transcript or sign language windows. When enabled, use arrow keys to move the window around the screen. - **Resize Mode** (R) Toggles keyboard resize mode for transcript or sign language windows. When enabled, use arrow keys to adjust window size. - **Reset Position** (Home) Resets transcript or sign language window to its default center position. ## Accessibility Features ### Auto-Focus When opening any menu via keyboard shortcut, the currently active item (or first item) is automatically focused, allowing immediate navigation with arrow keys. ### Visual Feedback All keyboard actions provide visual feedback: - Volume and mute state update the volume icon - Playback speed changes update the speed display - Caption selection updates the captions button state - All menu selections are immediately reflected in the UI ### Screen Reader Support - All buttons have proper ARIA labels - Volume sliders have `aria-valuenow` attributes - Menu items are keyboard-navigable with proper focus management - State changes are announced through visual updates ## Customization Keyboard shortcuts can be customized when initializing the player: ```javascript const player = new VidPly('#player', { keyboardShortcuts: { 'play-pause': [' ', 'p'], // Remove 'k' if desired 'mute': ['m'], 'fullscreen': ['f'], // ... customize other shortcuts } }); ``` To disable keyboard shortcuts entirely: ```javascript const player = new VidPly('#player', { keyboardShortcuts: false }); ``` ## Browser Compatibility Keyboard shortcuts work in all modern browsers: - Chrome/Edge 90+ - Firefox 88+ - Safari 14+ - Opera 76+ ## Tips 1. **Focus Management**: Click on the player or press Tab to focus the player before using keyboard shortcuts. 2. **Menu Navigation**: All menus support full keyboard navigation. Use arrow keys to browse and Enter to select. 3. **Quick Access**: Press S, Q, J, or A to quickly access common menus without clicking. 4. **Transcript Integration**: Use T to toggle the transcript for an enhanced viewing experience with synchronized text. 5. **Multiple Keys**: Some actions (like play/pause) support multiple keys for convenience based on different video player conventions. ## Related Documentation - [Getting Started Guide](./GETTING_STARTED.md) - [Usage Guide](./USAGE.md) - [Transcript Features](./TRANSCRIPT.md) - [Playlist Features](./PLAYLIST.md)