Skip to content

Conversation

@micahkepe
Copy link

Summary

Adds optional hotkey bindings to move the selection forward/backward in the ClipboardTool chooser. This improves keyboard-only navigation when reviewing clipboard history.

Changes

  • next_entry and prev_entry hotkey actions exposed via bindHotkeys().
  • _populateChooser(query) now accepts nil and defaults to "" to avoid errors when the chooser provides a nil query.
  • Formatting: consistent spacing/quotes and a few minor Lua style fixes (no functional change).

Why

Quickly navigating the clipboard list without leaving the keyboard is a common workflow. Adding next/prev actions makes the chooser feel more like a native list with predictable key-driven navigation.

Usage

Example mapping in your init.lua:

hs.loadSpoon("ClipboardTool")
spoon.ClipboardTool:bindHotkeys({
	show_clipboard = { { "cmd", "shift" }, "v" },
        -- new bindings below
	next_entry = { { "ctrl", "shift" }, "j" },
	prev_entry = { { "ctrl", "shift" }, "k" },
})
spoon.ClipboardTool:start()

Testing

  • Manual:

    • Load Spoon, copy multiple items, open chooser.
    • Trigger next_entry / prev_entry repeatedly; selection advances/retreats without errors.
    • Verified no regressions in show/toggle behavior.

Changed
- Add `next_entry` / `prev_entry` hotkey bindings.
- Minor formatting cleanups (consistent spacing/quotes) with no functional
  impact.

Fix
- Nil check on `query` parameter in `_populateChooser(query)` to default
  to "" in case of nil value

Testing
- Manual: load Spoon, copy multiple items, open chooser, navigate with
  bound hotkeys; no errors observed and selection advances correctly.
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.

1 participant