dillo-browser / dillo

Dillo, a multi-platform graphical web browser
https://dillo-browser.github.io/
GNU General Public License v3.0
544 stars 27 forks source link

Copy and paste don't work #228

Open marchuffnagle opened 1 month ago

marchuffnagle commented 1 month ago

I'm running Dillo version 3.1.1 (installed from the .deb file) in Xfce on Debian. If I try to copy or paste text in the URL bar, or copy text from the page, it does not work. I'm using C-c and C-v.

marchuffnagle commented 1 month ago

I see from the docs that it can be done, but not in the way that I (as a random user) would have expected. Would it be possible to add support for using the system's copy and paste functionality?

rodarima commented 1 month ago

Control+V seems to be working fine for me, I suspect the problem is that Control+C is not copying anything to the clipboard, which is a bug.

Details

There are two "clipboards" called selections in Xorg parlance: https://wiki.archlinux.org/title/clipboard#Selections

  • PRIMARY Used for the currently selected text, even if it is not explicitly copied, and for middle-mouse-click pasting. In some cases, pasting is also possible with a keyboard shortcut.
  • CLIPBOARD Used for explicit copy/paste commands involving keyboard shortcuts or menu items. Hence, it behaves like the single-clipboard system on Windows. Unlike PRIMARY, it can also handle multiple data formats.

In Dillo, ideally you should be able to use both. When you select anything it gets copied into the "primary" selection, which you can paste pressing the middle button or wheel (also Shift+Insert).

The "clipboard" selection is the one people outside UNIX are most used to, and works with the Control+C / Control+V shortcuts. On Dillo web forms and in the location bar, this seems to be working fine. The problem is when a chunk of text is selected from the page text and copied with Control+C which doesn't do anything right now, but should also place the text in the "clipboard" selection so it can be pasted with Control+V.

Regardless, Dillo has a history of encouraging users to use the "primary" selection where only the middle mouse button is required to paste. Middle clicking the red X on the location bar causes the "primary" selection to be opened as URL, see https://dillo-browser.github.io/user_help.html#location-bar. Copying any link via the context menu will place it in the "primary" selection, not in the "clipboard", so it won't be available via Control+V.