Cannot use Contrl-C to copy text to clipboard

Bugs

Modérateur : xcasadmin

Répondre
niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

Cannot use Contrl-C to copy text to clipboard

Message par niccolo » lun. mars 03, 2014 10:08 am

I'm using xcas (insalled via the Debian/Ubuntu repository at http://www-fourier.ujf-grenoble.fr/~parisse/debian/ ), on Ubuntu.

Often I want to copy text to the clipboard. So I mark some text with the mouse or keyboard and press Control-C.

The problem is that when the Control key is pressed down, the selected text is deleted. So I get no chance to use Control-C.

You may suggest to use Control-X instead (for "cut"), but it's the same story: I cannot press the control key without having the text deleted :-(

(BTW, it's sometimes customary to "paste" text on Linux using the middle mouse button, but I have only two buttons on my mouse so I can't do it.)

I'm using the most recent version of xcas (per the Debian repository) but I remember having this nightmarish "copy" right from the time I started using xcas (which wasn't too long back, but I don't have a date).

This bug makes using xcas almost unbearable.

Anybody knows of some alternative way to do "copy"?

parisse
Messages : 5109
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Cannot use Contrl-C to copy text to clipboard

Message par parisse » lun. mars 03, 2014 10:52 am

Really strange. I just checked on my ubuntu (11, i386) and Ctrl-C/V/X work. Did you install the stable or testing package, which ubuntu, is it i386 or amd64?

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Cannot use Contrl-C to copy text to clipboard

Message par frederic han » lun. mars 03, 2014 11:03 am

Hello,
I'am with ubuntu 12.04 amd64, I don't have your problem also.

what is your windows manager and lang (and ubuntu version)?

could you try if the problem persist with another windows manager?

I saw this in the web page of xcas:
Incompatibility with Unity
It has been reported than Xcas does not work correctly (crash, keystrokes not recognized...) under Unity (default window manager in recent Ubuntus). It is recommended to switch to an alternate window manager like Gnome, Xfce, Icewm, ...

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par niccolo » lun. mars 03, 2014 2:13 pm

I'VE FOUND A SOLUTION:

It turns out that only the right control key deletes the selection. The left control key doesn't delete it.

So my problem is solved now. I'll just have to train myself to use the left key.

(Just for the record: have you two ever tried the right control key? There's a slim chance you always hit the left one and therefore never witnessed the problem.)


====

BTW, there's one thing I now notice that might be helpful:

The right-control deletes the selected text only in the so-called "levels" (this includes the spreadsheet widget and the "program" textarea). It does NOT delete the selected text in the File/Open and File/Save dialogs, nor in the Help/Index dialog, nor in the "Cfg/General configuration" dialog (or the two other configuration dialogs).

====

FWIW, here are the answers to your questions:

(I wrote this before I discovered the solution. So I don't expect you to read it or reply to it. But perhaps it could help to track the problem down, in case other users encounter it.)

Window managers I've tried it on:

- xmonad
- jwm
- Unity (I've tried this just now, the first time in my life.)
- No window manager.

In all of them I have this problem: the right control deletes the selected text.

I've also created a new user account, to make sure I don't have some residual config somewhere (neither of X11 nor of xcas itself), and logged through it, but this didn't solve the problem.

I'm using Ubuntu 13.10, i386.

The "giac" package I have now installed is 1.1.0-44 (stable). The output line apt-get printed today:

Code : Tout sélectionner

http://www-fourier.ujf-grenoble.fr/~parisse/debian/ stable/main giac i386 1.1.0-44 [48.5 MB]
(But the problem exists in older versions as well.)

You were asking for my "lang". It's "en_US.UTF-8". I've also tried launching xcas via "LC_ALL=C xcas", but this changes nothing.

BTW, pressing ALT or SHIFT doesn't delete the selection. It's only the right control that does.

When I press the left control key, 'xev' tells me:

Code : Tout sélectionner

KeyPress event, serial 33, synthetic NO, window 0x2800001,
    root 0x6c, subw 0x0, time 162730952, (52,271), root:(748,448),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
When I press the right control key:

Code : Tout sélectionner

KeyPress event, serial 33, synthetic NO, window 0x2800001,
    root 0x6c, subw 0x0, time 162771767, (52,271), root:(748,448),
    state 0x0, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False
My keyboard is conventional. Nothing special in it.
Dernière modification par niccolo le lun. mars 03, 2014 2:27 pm, modifié 1 fois.

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par niccolo » lun. mars 03, 2014 2:23 pm

parisse a écrit :Really strange. I just checked on my ubuntu (11, i386) and Ctrl-C/V/X work.
Just to clear a possible misunderstanding: It's pressing the right control key that already deletes the selected text (its "keypress event", in technical speak). So I don't even get a chance to hit C/V/X.

(When no text is selected, the right control key is harmless.)

Cheval
Messages : 66
Inscription : mar. sept. 24, 2013 7:51 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par Cheval » lun. mars 03, 2014 8:16 pm

Hello everybody,
I just tried on my PC, Lubuntu13.04 i386, with Giac 1.1.0-41, no problem neither with left nor right ctrl key, copy and paste are both possible with the two ctrl keys.
Now, maybe another possibility for the bug : I suppose, niccolo that you've got a qwerty keyboard ? mine is azerty and I think it's the same for a lot of people on this forum.

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par niccolo » mar. mars 04, 2014 6:02 am

Cheval a écrit :I suppose, niccolo that you've got a qwerty keyboard ? mine is azerty
I think it's irrelevant: it's the control key itself, not the following "C/V/X", that causes the deletion.
Dernière modification par niccolo le mar. mars 04, 2014 6:18 am, modifié 1 fois.

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par niccolo » mar. mars 04, 2014 6:03 am

I've found the cause of the problem:

I googled "fltk 'right control'" and found a bug report for FLTK:

Fl_Text_Editor: right control key deletes text

It turns out that it's a "feature". Quite a horrific one.

I wonder why I'm the only one who encounters this issue. Xcas is statically linked, so we're all supposed to be using the same version of FLTK.

BTW, is there a way to see which version of FLTK xcas is linked with?

parisse
Messages : 5109
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Cannot use Contrl-C to copy text to clipboard

Message par parisse » mar. mars 04, 2014 6:55 am

It's a patched version of FLTK (from the time where the published version did not have printer support), available on my site. Xcas now links with the published version of FLTK, but they have a clipping stack that is not deep enough, therefore I keep linking with the old patched version.

Cheval
Messages : 66
Inscription : mar. sept. 24, 2013 7:51 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par Cheval » mar. mars 04, 2014 7:47 am

I think it's irrelevant: it's the control key itself, not the following "C/V/X", that causes the deletion.
Ok, I understand that, but on my PC, I can't obtain such behavior of right ctrl key : it doesn't delete anything
I wonder why I'm the only one who encounters this issue
Personnaly, I just dicovered that a right ctrl key was existing !!! => maybe one possible reason !

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Cannot use Contrl-C to copy text to clipboard

Message par frederic han » mar. mars 04, 2014 9:22 am

Hello,

I have done a linux32 tarball version of xcas and qcas that can be installed in the homedir (or elsewhere if you adapt the path in the scripts).

It doesn't conflict with the .deb and it is compiled with the current fltk in ubuntu 12.04 i386, so you could try if it works for you.

http://www.math.jussieu.fr/~han/xcas/xc ... inux32.tgz

best

Frederic

Cheval
Messages : 66
Inscription : mar. sept. 24, 2013 7:51 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par Cheval » mar. mars 04, 2014 1:19 pm

Sorry, Frederic, I can't launch anything (Xcas, Qcas, or Icas) from the folder /home/xcas110. I tried as normal user and root user, and also tried "launch in terminal" => nothing...
I have a 13.04 version : is it a problem ?

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: Cannot use Contrl-C to copy text to clipboard

Message par frederic han » mar. mars 04, 2014 2:02 pm

the scripts are configured for the user home directory.

Ex:

Code : Tout sélectionner

tar -xzf xcasqcas-1.1.0-44_user-linux32.tgz -C ~/

so you should either:

mv xcas110 ~/

or adjust the XCASDIR variable in the scripts xcas110/xcas, xcas110/qcas
(in your example: /home/xcas110)


then xcas110/xcas
or xcas110/qcas

or is it another problem?

Cheval
Messages : 66
Inscription : mar. sept. 24, 2013 7:51 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par Cheval » mar. mars 04, 2014 3:54 pm

Thank you for your help, it's ok now, I could try Xcas : no pb with letf or right ctrl.
But I had also no problems with my installed version...

Cheval
Messages : 66
Inscription : mar. sept. 24, 2013 7:51 pm

Re: Cannot use Contrl-C to copy text to clipboard

Message par Cheval » mar. mars 04, 2014 4:07 pm

I just made another test : I tried on my debian (unstable) based Mint, with giac 1.1.0-42 : no pb with both ctrl keys, the right and the left. I also launched your specific version : it's full ok also

Répondre