Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Andrew-Barton
Copy link

Description

This PR implements quick paste shortcuts that allow users to directly paste clippings from positions 1-5 in the stack using modifier key combinations with number keys (1-5).

Fixes #91

Changes

  • Added quickPasteHotkeys array in AppDelegate to store hotkey instances for positions 1-5
  • Implemented setQuickPasteHotkeys() method that registers hotkeys using the main hotkey's modifiers (Ctrl+Opt by default) combined with number keys 1-5
  • Added pasteAtPosition() method in Interactions that directly pastes from a specific stack position without hiding the app
  • Added UI checkbox in HotkeyPreferenceViewController to enable/disable the feature
  • Updated preference descriptions to reflect the new shortcuts

How It Works

When enabled, users can:

  • Press Ctrl+Opt+1 to paste the 1st clipping (most recent)
  • Press Ctrl+Opt+2 to paste the 2nd clipping
  • Press Ctrl+Opt+3 to paste the 3rd clipping
  • Press Ctrl+Opt+4 to paste the 4th clipping
  • Press Ctrl+Opt+5 to paste the 5th clipping

The shortcuts use the same modifier keys as the main Jumpcut hotkey (default: Ctrl+Opt), ensuring consistency with existing keyboard shortcuts.

User Experience

  • The feature is opt-in via a checkbox in the Hotkey preferences pane
  • Quick paste shortcuts respect the "Move clippings after use" preference
  • Works seamlessly with existing Jumpcut functionality (bezel, menu, standard paste)
  • No changes to existing behavior when the feature is disabled

Testing

  • Tested on macOS with TextEdit and BBEdit
  • Verified that quick paste works correctly with Accessibility permissions enabled
  • Confirmed that the feature respects user preferences (move to top after use)
  • Tested that disabling the feature removes all quick paste hotkeys

Notes

This implementation addresses the workflow described in issue #91, where users frequently need to paste multiple clippings in sequence (e.g., AI-generated headings followed by terminal errors). The shortcuts provide direct access to the first 5 clippings without needing to open the bezel or menu.

- Restored pasteAtPosition() function in Interactions.swift
- Restored quickPasteEnabled setting in Settings.swift
- Restored quick paste checkbox UI in HotkeyPreferenceViewController.swift
- Restored deprecation fixes in StatusItem.swift

These files were lost during the rebase but are required for the quick paste feature to work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request - paste 1st, 2nd, 3rd item using keyboard shortcuts?

1 participant