Using R shortcut (repeat selection) replaces the current copied objects in clipboard

• Jun 18, 2021 - 18:43

Hello everyone,

Using R shortcut to repeat selection replaces the current objects in clipboard (copied by user) with the repeated part.
I would suggest using a local data memory for the "repeating selection" process as it is a temporary local operation rather than using the system clipboard which probably contains an object that will be used later.

Best regards.


If you are on Windows you could use AutoHotkey to create as many clipboards you need.
The attachment gives an example with 12 clipboards. Rename the extension in .ahk
COPY: Select a range. Press Control + C. Assign the contents of this clipboard to one of 12 clipboards by pressing CapsLock + Functionkey
PASTE: First invoke a clipboard by pressing CapsLock + 1,2,3,4,5,6,7,8,9,0,- or =
Next select a note or rest and press Control + V
The attachment includes the AutoHotkey macros and some more info.
Having multiple clipboards at your disposal is an incredible timesaver.

Attachment Size
Multiple_Clipboards.txt 2.34 KB

In reply to by MichLeon

Thanks for your suggestion MichLeon, it is useful in general.

I am rising here an issue about MuseScore itself, "repeat selection" command replaces the existing objects in memory (even if they are not related to MuseScore) with the repeated objects, try to Paste after "repeat selection", you will get the same repeated objects pasted, even though you didn't even copy anything!
I am advising (in programming side) not to use the Clipboard to store the objects during the "repeat selection" process because it might contain something important to be pasted somewhere later!

Thanks again

In reply to by Marc Sabatella

Thank Marc for your reply,

I would choose not to mix features in a command titled "repeat selection" else it will be a Macro, especially that the additional feature affecting the whole system clipboard which must has something by the user copy-choice then If really it means to me a lot that the repeated part to be in the Clipboard for a future Paste, I would Ctrl+C it after selection and before R.

In reply to by Thair Joudi

It seems to me that the purpose of the clipboard is for a " temporary local operation". I can't imagine relying on it across several operations. If I know I have something important in the clipboard, I would deal with it then use "R". It should be safe, but you never know. Personally, I would not be interested in yet another keystroke to have to remember. But then, I admit my needs are pretty simple. I guess I would have to choose between not using "R" or putting the contents of the clipboard somewhere first. Then coming back to it. I know that isn't very efficient. Folks always want the fastest way to do everything.

In reply to by bobjp

  • I never experienced any program which puts something in the Clipboard with a command but "Copy" or "Ctrl+C"!
  • I should declare a local variable to do such process without the need to use Clipboard.
  • I can't imagine that after "repeating selection" I will need to use it somewhere else, just repeating it to be next to the original selected part.
    I should not add unexpected extra feature to a command's process called "repeat selection".
    And if I really need to use it after the "repeat selection" somewhere else, I would Ctrl+C it after selection and before R.
    Anyway, I gave up :)
    I will just make a plugin called "repeat selection and just repeat it without putting it in the Clipboard" :)

Thanks and best regards.

In reply to by Thair Joudi

I wouldn't expect notation software to behave like other programs. Though it can happen.

I have no problem sharing the clipboard. In fact I never knew it did until this thread.

Personally, I use the "R" far,far more than Copy + Paste to the clipboard. I would find having to invoke a plugin less desirable.

In reply to by bobjp

Though to be fair, the "R" function in Sibelius does not use the clipboard. I never noticed it because my workflow is different. Which means that if I R'd a selection, then wanted to use it in a different staff, I would have to C + P anyway. MuseScore doesn't work that way. I'm not sure one is better than the other. Just different.

In reply to by Thair Joudi

quote "I never experienced any program which puts something in the Clipboard with a command but "Copy" or "Ctrl+C"!"

On Windows OS yes...
But in Linux OS, selecting (marking) something that can be selected (usually a text) with the mouse or arrow keys causes it to be registered as a Primary-selection. And you can paste it with middle mouse button, anywhere cursor is active (You can paste also with Shift+Insert keys, but it doesn't work in all software. eg: F1refox and G00gle-D0cs are buggy in this process). Meanwhile, something else that you copied earlier with the "Ctrl+C" keys is waiting in the clipboard section. // So in this case, we can say that there is one System clipboard and one Primary-selection (or selection buffer) clipboard (in Linux).

The "R" key, which Musescore uses to repeatedly copy the selection, also works as a kind of Primary-selection. The only difference is that it saves the copy also made with the "R" key on its own clipboard. //This is the equivalent of pressing Ctrl+C after selecting something in Linux. In this case you have identical copies in both the Primary-selection and the Clipboard.

PS: It may seem like a message with unnecessary information, but I wrote it believing it explained some issues.

Do you still have an unanswered question? Please log in first to post your question.