there may be a workaround that relies on calling external tools (but these are platform dependent → if this approach works, it probably would be a good reason to hide the platform depencies from a user in a quark)
for MacOS, commands like “pbcopy” and “pbpaste” exist which can be used to copy / paste things to the clipboard.
for linux, similar tools xclip and xsel exist (which may need to be installed first)
for windows, I’m not sure what exists - (probably some powershell commands exist)
Thanks, @prko - this is pretty close to what I’m trying to do. I’ll see if I can tie it to a button object…
The one part I’m a little uncertain about is whether or not there’s a way to evaluate a variable within this…for example:
~a = (123456)
// Double-click the bracket to copy `~a`,
// then paste it elsewhere.
If you want to copy a code allocated to a variable. you can enclose brackets as follows:
(~a = 123456)
(
a = { |x = 0, y = 0|
x + y
}
)
However, you seem to want to allocate two actions to a double-click action:
evaluate the selected code block
copy the selected code block
Then the part related to allocating keystrokes should be edited.
However, I think it should be better to implement these actions as the default action in sclang or SC-IDE (or its equivalents), but I do not know how to do it.
On linux there’s a lot of distros moving from X11 to wayland these days (maybe ubuntu studio is already using wayland?) – i use arch linux with hyprland – i tried before to use xdotool without sucess. some clipboards managers that works with wayland on this link: Clipboard managers – Hyprland Wiki
@igormpc
What I used is not a clipboard manager, but a keystroke functionality.
On Ubuntu, wayland is already installed, but ydotool and ydotoold are needed for the same task, but there is no ydotoold on the system, even though ydotool is installed.
I cannot find a general solution for implementing the functionality on Linux. Sorry about that.