Open Bug 228011 Opened 21 years ago Updated 1 year ago

Can not paste Primary Selection from the keyboard in X11.

Categories

(SeaMonkey :: General, defect)

x86
Linux
defect
Not set
minor

Tracking

(Not tracked)

REOPENED

People

(Reporter: halcanary, Unassigned)

Details

(Keywords: helpwanted)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 I tested this with the following builds, so it's not Firebird specific. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 In X11 there are not one but two clipboards. There is the normal clipboard selection, used by Ctrl-C and Ctrl-V or the context menu. There is also the primary selection, wich can be pasted with the middle mouse button. See http://www.jwz.org/doc/x-cut-and-paste.html On some applications, such as gnome-terminal, ctrl-v pastes from the normal clipboard selection and ctrl-insert pastes from the primary selection. I would like for my browser to have the same behavior. If you think that the way unix mozilla works now is correct, that's fine: it's a matter of personal preference. But I would like to be able to change the behaviour by editing one of the config files. Reproducible: Always Steps to Reproduce: 1. 2. 3.
> ctrl-insert pastes from the primary selection. Unfortunately, ctrl-insert is already coopted as a synonym for Ctrl-c. I'm not sure there's anyone working on Unix selection stuff, and major bugs in it have gone unfixed for years; this component needs an owner...
Keywords: helpwanted
I meant shift-insert, not ctrl-insert. Sorry.
I strongly agree, and I've voted for this bug. Has there been any activity on this recently? Is anyone working on the unix selection stuff now? If not, I might consider diving in and trying to hack together a patch. Does anyone have any pointers as to where the best place to start would be, or any resources on the unix selection code?
as a workaround, i've written a patch to autocutsel ( http://savannah.nongnu.org/projects/autocutsel/ ) which synchronizes the primary and clipboard selections. so, when you select something, it copies that value to the clipboard (technically, it just stores the value owns the clipboard), so shift-insert in mozilla works like we want. of course, if you actually use the primary selection and the clipboard independently, this won't work for you...but i don't know many people who do that. anyway, the patch is here: http://savannah.nongnu.org/patch/?func=detailitem&item_id=3367 incidentally, i spent a couple weeks hacking on mozilla trying to get this to work. i tried a bunch different angles - changing the XBL command binding, changing the key binding to an action that calls nsReadFromClipboard() in navigator.js, actually implementing a new clipboard command and hooking it into nsGlobalWindowCommands.cpp, etc. - but failed at all of them. it's obviously not impossible, but i was a little discouraged. :P granted, i wasn't writing a simple little XUL app, i was hacking on the guts of mozilla...but still, it wasn't a pleasant introduction to the codebase. http://bugzilla.mozilla.org/show_bug.cgi?id=228011
Product: Browser → Seamonkey
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → EXPIRED

Still an issue; nobody said anything because nothing has changed.
Arguably might want to DUP this to 1070518 because that bug has a patch, even though that one is newer.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: EXPIRED → ---

Indeed, It's a dup' to 1070518 (which should be assigned to the "Firefox" product)

I cannot reproduce this bug in current release SeaMonkey 2.53. I can select middle click to cut and paste by middle click and it is different than ctrl+c and v.

Env: Fedora 39, distro version of SM253, xorg, openbox.

Flags: needinfo?(akkzilla)

Currently in Firefox 129.0.2:

Middle mouse: pastes PRIMARY
Ctrl-V: pastes CLIPBOARD
Shift-Insert: pastes CLIPBOARD

So the original issue still applies, since the original report was asking for Shift-Insert to paste PRIMARY rather than CLIPBOARD, and is also asking for this to be configurable.

On the other hand, the original report says that gnome-terminal pastes PRIMARY on Shift-Insert. That may have been true when this bug was first opened (in 2003?) but it wasn't true in 2020, when I went through several different terminal apps and they all pasted CLIPBOARD on Shift-Insert: see
https://shallowsky.com/blog/linux/x-selection-keys.html

That table does show that most Linux terminals and LibreOffice use Shift-Insert to paste PRIMARY, not CLIPBOARD. So I'd say the original complaint is still valid -- Firefox is an outlier and doesn't conform to what most other programs do.

Flags: needinfo?(akkzilla)

Seems more nuanced than I had initially assumed. Thank you for the fantastic breakdown and how this relates to today's state of affairs.

You need to log in before you can comment on or make changes to this bug.