Pasting from a parallel clipboard with middle-click

Not entirely related, but it would be nice if more Haiku programs supported a “primary” selection (clipboard) that can be inserted into a text field with the middle mouse button, and is updated by selecting text. So if you write a clipboard monitoring daemon, please consider supporting that along with the “system” clipboard.

Emacs already supports such a clipboard (it’s just named “primary”.)

I am not aware Haiku supports this at all. It feels really unixy-x11-y hack to me, therefore if it is not yet implemented in Haiku i am wholeheartedly against it.

It is not a native Haiku program, probably it uses its own logic to accomplish it.

1 Like

Haiku supports named clipboards that are shared among applications. That is how I implemented them for Emacs.

I don’t have problem with the named clipboards, but with the UX. I don’t think middle click should insert anything anywhere.

1 Like

Can’t you decide for yourself what happens with which click in the program? It’s just a matter of programming, isn’t it?

1 Like

Programs should follow the Haiku way, otherwise there won’t be any consistency.

For example check copy-paste shortcuts in *nixes: on the GUI it is Ctrl+C/Ctrl+V, but in the terminal ist is Ctrl+Shift+C/Ctrl+Shift+V. Left mouse selects and copies, middle mouse button inserts in Terminal, and sometimes on the GUI, but not everywhere. Good luck using your muscle memory.
On the other hand Alt+C/Alt+V works everywhere in Haiku.

Nixians argue I should learn what they are already used to. I tell them this is not really good idea, the '70s re over and this way the inconsistency of nixes will continue to infect other operating systems and affect programs and life of the users who wasn’t even yet born as all of this got decided and who are now powerless to reform or change it. Nixians would like to cement you where they are, if they have pain then everybody should feel the same, they even argue this is a historical and traditional pain and you are silly and you are harming their freedom if you don’t want to feel it.

Nix stuff should stay in nix. They / it made enough harm for the humanity already.

If you’re going to categorically dismiss everything that originated on X as “harmful for humanity”, then you can’t possibly expect to be taken seriously.

Middle click isn’t taken by anything (on Haiku and on other systems), so why not use it for this very convenient feature?

1 Like

There are tons of *nix descendant operating system, and while we can argue in some areas we can consider Haiku also as one, but not every OS needs to work the same (wrong) way. Some OS can be designed from ground up instead of duct-taping things together.

Exactly as it is not yet taken by anything it is dangerous to say yes for the first proposal, considering it follows *nix ideology. Currently you are complaining why it is not yet implemented. If it gets implemented and it needs to be removed later on then hundreds of people will complain their workflow depends on it. Do not chain the hands of the Haiku developers and users with sketchy decisions from the past. Thanks.

Inserting something from the clipboard by pressing the mouse wheel can also be problematic, for example if you fill out a document and accidentally press the wheel while scrolling and make entries that you don’t want, or even worse, you overwrite data that has already been entered.

You should be able to capture clicking on the mouse wheel and use it in a program, but not use it as a standard with a function other than scrolling (in the system).

1 Like

Funny, since I’ve never ever experienced that. But if it does happen, undo is a single key press away.

It means “close contextually” and “open seperately contextually” almost everywhere.
Firefox also thought “backspace doesnt bind to anything when not in a textfocus!” and reused it for “previous page”
That failed horribly aswell.

X11 does indeed have multiple clipboards, but even with “only” native X11 clients (no cli emulators and such) this is incredibly confusing to use because the clipbords hold different data at the same time. For example middle click might insert different data than ctrl+v often.

Haiku supports multiple datatypes in the clipboard, in the form of allowing the receiving programm to say what data type it wants (say it can choose between text/plain and text/html for example)

If you want to set up a shortcut for middle click that activates the hovered textfield and inserts text that should be possible indeed.
I don’t think this should be a default either though.

As a fun sidething the normal way to copy and paste on a IBM PC is ctrl+insert and shift+insert… maybe this works on windows still, but it is largely forgotten.

The primary selection (what you get with a middle click) is not the clipboard (what you get with Ctrl+V) and doesn’t insert the same thing as the clipboard. Its contents are of whatever text was last highlighted in any program, and text fields aren’t links, so they don’t have an equivalent to “open separately.”

X also supports converting a selection to multiple data types (they are just called “targets” instead of data types), but that’s peripheral to having multiple selections.

You argued before that middle click has no use, bow you shifted to saying it has no use for textfields, but that is also not acurate. In many OSes this does stuff related to selecting tect, not replacing it.
One major feature that is also expected with middle click is “autoscroll” which firefox for example disables on linux only because it conflicts with pasting stuff into the textbox.

There is no conflict free way to do this feature, honestly.

I am award of the destinction. But this is only in the design of X, in reality some clients support only ctrl+v and some only middle click, and some only a different shortcut. Some clients change both buffers and others only some. This all makes it incredibly confusing to users and basically unusable to anyone except power users.

I don’t really see the point of adding this by default seeing as we can’t do this conflict free and it adds way more confusion to users.

But again, if you want to do this with shortcuts on your install you should be able to. (should be in the sense of the design should accomodate this, not that it does currently)

Where else except text fields does it make sense to insert text? Besides, autoscroll only happens if you drag the mouse with the middle button held down, and it doesn’t exist on Haiku anyway.

And on X, all clients (since about 2000 or so) implement the clipboard and primary selection correctly, and every major toolkit and program uses the correct keyboard shortcuts and mouse buttons for both. If you don’t believe me, try to name one where selecting text still puts stuff into the clipboard, or cutting text still puts stuff into the primary selection.

I find that incredibly unlikely, not having used X in the 2000s or anything close to it.

And even if it were the case it would not disprove anything I wrote above.

What do you mean by “that”? Everything you wrote above about X is wrong, and autoscroll can be implemented along with using the middle button to insert the contents of the primary selection, since it involves dragging. None of that is relevant either, since the middle button currently does nothing at all on Haiku, not overscroll nor selecting text.

Do you see the problem here?

No, this is incorrect, a single middle click without dragging starts autoscroll, not with dragging.

I already wrote some uses above that work now, how is that “nothing at all”?

Anyhow, you falled to adress any of my arguments in the previous posts so I see no reason to continue this discussion further.

No, this is incorrect, a single middle click without dragging starts autoscroll, not with dragging.

And in which direction will the scroll go?

I already wrote some uses above that work now, how is that “nothing at all”?

Which uses? What happens in StyledEdit if you press the middle button in some text?

Excuse me for being blunt, but there is no Unix “ideology” in inserting the contents of the primary selection with the middle mouse button. It is a convenient feature, which is not duct-taped together, or sketchy, and will not chain the hands of users or developers.

1 Like

They say: “Those who do not understand *nix are condemned to reinvent it, poorly.”
But from my POV the *nix fans trying to convert everything to *nix while even *nix is invented and developed poorly, so i don’t understand their fixation.

I personally maintain the opinion the nix culture, ideologies and solutions are dangerously contagious and it should be stopped.

But whatever, you should probably start a vote about the mouse-click function.