Skip to content

Implement paste stack#1206

Closed
weisJ wants to merge 19 commits intop0deje:masterfrom
weisJ:paste_stack
Closed

Implement paste stack#1206
weisJ wants to merge 19 commits intop0deje:masterfrom
weisJ:paste_stack

Conversation

@weisJ
Copy link
Copy Markdown
Collaborator

@weisJ weisJ commented Sep 15, 2025

This is an implementation of the paste stack proposed in #1175 (comment).

The basis for this is an added multiple selection functionality. To select multiple items one can either use one of the following keyboard shortcuts

  • SHIFT + DownArrow/CTRL + SHIFT + n: Extend the selection to the next item
  • SHIFT + CMD/Option + DownArrow/CONTR + OPTION + SHIFT + n: Extend the selection to the last item
  • SHIFT + UpArrow/CTRL + SHIFT + p: Extend the selection to the previous item
  • SHIFT + CMD/Option + UpArrow/CONTR + OPTION + SHIFT + p: Extend the selection to the first item

or CMD + Click with the mouse to select additional items.

The order they are selected in is displayed next to the item content.
Once more than one item is selected moving the mouse over other items no longer auto selects the item as this would make mouse selection impossible and make accidentally clearing the whole selection to easy.

Pinning and deleting multiple items works as expected.

One can then use any of the existing shortcuts to create a paste stack.
This immediately copies the first selected item to the clipboard ready to paste. Once the item has been pasted it is removed from the top of the paste stack and the next item is automatically copied to the clipboard. The paste stack remembers the shortcut used to create the stack i.e. if the "copy without formatting" shortcut was used then all subsequent copies will also be copied without formatting.

Note that the "paste automatically" option does not work with paste stacks. Pasting always has to be initiated by the user.
I did not manage to listen for CMD + V using the carbon api without the shortcut being consumed (with the result that pasting becomes impossible). This feature therefore requires accessibility permissions as it globally listens for CMD+V key presses.

The current paste stack is displayed at the top of the history list. The number displays the current number of items in the stack.

SCR-20250915-jwmx

Here is a video of the behaviour in action. The visuals are slightly outdated but the user interaction hasn't changed since:

Screen.Recording.2025-09-04.at.14.41.19.mov

It can be selected like any other entry. To discard the current paste stack simply delete it using OPTION + Backspace.

If any other copy happens while the paste stack is active (either through Maccy or otherwise) the stack is discarded. Feedback on this would be welcome as I had no better idea what the behaviour should be in this case.

The paste stack does not reorder any items in the history list on its own. The items get moved to the start of the list just as if they were copied regularly. After pasting all items of the stack this effectively puts the items of the paste stack at the start of the history list in reverse oder (Assuming sorting by time of last copy).

I have tried to group the changes into logical steps. Every commit should compile on its own, but there may be things included in some changes, which are only used in a later commit.

Relates to #1175 #239

@weisJ
Copy link
Copy Markdown
Collaborator Author

weisJ commented Sep 15, 2025

Is the bitwise CI working properly? The details page gives me an internal server error.

@weisJ weisJ force-pushed the paste_stack branch 3 times, most recently from 1b4cd1e to f25c692 Compare November 21, 2025 17:21
@p0deje p0deje mentioned this pull request Nov 22, 2025
2 tasks
@weisJ weisJ mentioned this pull request Nov 28, 2025
2 tasks
@weisJ weisJ mentioned this pull request Dec 27, 2025
@weisJ weisJ mentioned this pull request Feb 8, 2026
@weisJ weisJ closed this Feb 8, 2026
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