Spoons icon indicating copy to clipboard operation
Spoons copied to clipboard

feat(ClipboardTool): add next/prev hotkey options

Open micahkepe opened this issue 4 months ago • 0 comments

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.

micahkepe avatar Sep 01 '25 16:09 micahkepe