Floating Popup HUD
Trigger gestures, HUD layout, pagination, positioning rules, and dismissal behavior.
Activation Triggers
OpenClip activates through three natural macOS gestures:
- Drag Selection: Automatically fires when the mouse moves > 3 pixels (dx² + dy² > 9) between mouse-down and mouse-up.
- Multi-Click: Double-clicking a word or triple-clicking a paragraph (clickCount >= 2) opens the HUD in 0ms upon mouse release. Single clicks without drag are ignored.
Highlighting text via ⌘A (Select All) or Shift + Arrow keys (including ⌥⇧↑/↓/←/→ and ⌘⇧↑/↓/←/→) triggers the HUD with a 150ms debounce to prevent flickering during rapid key repeats. The HUD anchors to the text’s bounding box coordinates.
⌥⌘C)Pressing Option + Command + C manually opens the popup. If no live text selection is active, OpenClip enters Clipboard Fallback Mode, opening the HUD anchored to your cursor to process the current clipboard string.
HUD Layout & Pagination
The floating popup bar presents relevant actions in a compact, non-activating window:
- Page Capacity: Shows up to 7 actions per page (
pageSize = 7). - Navigation Chevrons: Compact 26pt buttons on the left and right appear automatically when more than 7 actions are enabled.
- Word Completions: If spelling guesses or completions exist, an indicator arrow appears on the far left.
- Command Palette: A magnifying glass icon on the far right launches the search palette.
Visual Themes
Glass Theme
macOS ultraThinMaterial backdrop blur with dynamic high-contrast hairline borders.
Classic Theme
Crisp, high-contrast solid container supporting System, Light, and Dark modes.
Multi-Display & Positioning
OpenClip calculates screen geometry to ensure the HUD never covers the selected text or clips off-screen:
- Directional Smart Flip: Downward mouse drags position the HUD below the cursor (as text is above); upward/horizontal drags position the HUD above the cursor.
- Multi-Monitor Safe: Detects the active display frame (
NSScreen) containing the cursor and clamps with an 8pt screen edge margin. - Bottom Screen Threshold: If the HUD is placed within 280pt of the bottom edge, it locks its bottom anchor so expanding search palettes or AI cards expand upward into the display.