Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JabRef and the X Window clipboard/selections #2389

Closed
gregoa opened this issue Dec 16, 2016 · 10 comments
Closed

JabRef and the X Window clipboard/selections #2389

gregoa opened this issue Dec 16, 2016 · 10 comments

Comments

@gregoa
Copy link
Contributor

gregoa commented Dec 16, 2016

[JabRef version 3.8~pre2+ds-1 from Debian/experimental. But the issue is not specific to this version.]

The X Window System has usually three "selections": primary/XA_PRIMARY - copying by highlighting with the first mouse button, pasting by clicking the third (middle) button; secondary/XA_SECONDARY (never seen this in action); and clipboard/XA_CLIPBOARD which acts like the clipboard on e.g. Windows (Ctrl-C, Ctrl-V and copy/paste menu items or buttons).

It seems that JabRef only supports the last version (the "clipboard"). This can be seen e.g.

  • in the "Copy DOI URL" function which copies the URL into the XA_CLIPBOARD selection (and not (also) into XA_PRIMARY);
  • in the "New entry from plain text" dialog, where (first of all neither middle-clicking/XA_PRIMARY nor Ctrl-V/XA_CLIPBOARD in the text box does anything but) using the "Paste" button pastes the contents of the XA_CLIPBOARD selection.

I don't know how to make Java under X11 use the XA_PRIMARY selection as well but I'm sure this is not the first time in the history of Java that this question comes up :)

Cheers,
gregor

@Siedlerchr
Copy link
Member

Siedlerchr commented Dec 17, 2016 via email

@koppor
Copy link
Member

koppor commented Dec 18, 2016

With JavaFX it seems to be impossible (?): How can I read the X11 clipboard from a JavaFX application?. So strange that this seems not to be discussed on stackoverflow... I am now playing around with Toolkit.getDefaultToolkit().getSystemSelection().

@koppor
Copy link
Member

koppor commented Aug 10, 2017

@snisnisniksonah found https://bugs.openjdk.java.net/browse/JDK-8088117:

Using JavaFX-8 with Java8u45 on SUSE11, there is no possibility to copy/paste using mouse selection or using a click on the scroll. See details here: http://stackoverflow.com/questions/30032290/javafx-mouse-clipboard-does-not-work-in-unix

The solution won't satisfy you:

Lowering the priority to P4. I note that this is more of an unimplemented feature than a bug (it has never been supported in FX). We will look at it for JDK 9.
Workaround: use copy/paste (CTRL-C / CTRL-V)

Reading @glaubitz (https://lists.debian.org/debian-java/2017/08/msg00024.html), I have the hope, there could be someone "just" implementing that.

@koppor
Copy link
Member

koppor commented Aug 10, 2017

Since this is not possible to implement, I close the issue.

Having the hope that JDK9 or JDK10 can solve that, I added on-hold label and close the issue for now.

@koppor koppor closed this as completed Aug 10, 2017
@koppor
Copy link
Member

koppor commented Oct 2, 2019

I rechecked the issue on openjdk and it is still not implemented.

@koppor koppor added the java label Oct 2, 2019
@koppor
Copy link
Member

koppor commented Oct 9, 2019

There is a SO answer from Feb 2019: https://stackoverflow.com/a/54530538/873282. Needs to be checked.

@davidemdot
Copy link
Member

Hey! I would like to work on this issue, if it is available :"D

@koppor
Copy link
Member

koppor commented Oct 14, 2019

Go ahead! 👍

@koppor
Copy link
Member

koppor commented Oct 27, 2019

@gregoa We worked on it and think, we fixed it. Could you try the latest build at https://builds.jabref.org/master and report back if it works for you.

@gregoa
Copy link
Contributor Author

gregoa commented Oct 27, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants