Page MenuHomePhabricator

elm code does not support 3rd mouse button/emulated 3rd for paste
Closed, WontfixPublic

Description

It seems elm code is missing support for 3rd mouse button paste, emulated 3rd button for 2 button mice. This works in elm_entry, single and multi-line. I checked in EDI and tests.

This is on master and should also be in the 1.20 release

wltjr reopened this task as Open.Aug 8 2017, 1:51 PM

Re-opening as 3rd button paste is not working. I tried in ecrire, elm tests, and edi under EFL 1.20.1. Looking at the commit none of that code is grabbing the content from the buffer and putting it into elm_code. Seems your trying to show some pop-up or something. This is a transparent operation. You either press 3rd mouse button or both left+right at the same time, 3rd button emulation, and it pastes the text.

This is a very important feature. It is why I still mostly use another editor for that feature.

Please expand on "not working".

If I open elementary_test and click "Code Editor" then highlight some text and click the middle mouse button it takes the selection and dumps it into the editor at the mouse position.

Perhaps you could provide some more specific steps for how this should work?

I select text in Ecrire or any application. Then go to paste that text into any elm_code and it does nothing. With your explanation I see the function works for things copied from within elm_code but not outside text. Like copy text from your browser, and paste into elm_code. A URL, the text from this bug, etc. None of that works for me.

Also the 3rd button within is not ideal either. When I select, and then use 3rd button to paste. The text is no longer selected. It should remain selected, so I can keep pressing the 3rd button and it keep pasting. Seems to be clearing out the selection. Which is fine, but also clears out the paste buffer. Such that on 2nd press of 3rd button it does nothing.

Select a URL in your browser or text
Start Terminology
Used 3rd button to paste in Terminology

Text remains selected in browser, and you can keep pasting the same thing into terminology over and over.

The functionality is close, definitely working from within elm_code. Select text and can paste that once with 3rd button. Just need the following;

  • Not clear selection and/or buffer for repeated pastes
  • Allowing selection to be outside of elm_code. Select text from another application, and pasting into elm_code via 3rd button.

Thanks for the details, that clears things up a bit - I see that it is working internally but not with regards to the shared clipboard.

I disagree, however, with the assertion that it should not clear the selection. The Elementary Entries all perform the same selection reset when a paste operation occurs - I think that consistency with the rest of EFL is most important so that aspect is probably correct.
I'll look into the clipboard interaction portion.

Look around and your disagreement will change. I just did elm test. I typed in entry in Search Menu. I selected that text. I then went to terminology and pasted it over and over. Guess what? The selected text in entry remains selected...

This is consistent with EFL and pretty much anything under X, not sure about Wayland, GTK, Qt, FLTK, etc.

Please pause for a moment and consider that I might have checked already.
Given that we were talking about copying and pasting within the same entry that is what I tried.

elm entry test - highlight some text and paste into the same entry at the mouse pointer - it will reset the selection.

I agree that external applications pasting should not affect the selection of the source editor - but that cannot be tested until I fix the main issue you mention whereby it does not support interacting with other applications!

For me it does not work that way. The selection must be cleared before I can past in the same field, on single line entry. Select text, then click in field clears selection, then paste via 3rd button. When I go to Entry Notepad and select and 3rd button paste. It cuts and then pastes. So the original copy is no longer there. Playing with some of the other entry tests, sometimes 3rd button works, sometimes it does nothing .There is no consistency, and if anything seems a good deal of inconsistency.

ajwillia.ms added a project: Restricted Project.Aug 17 2017, 8:13 AM
ajwillia.ms moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 17 2017, 8:18 AM
netstar closed this task as Resolved.Aug 31 2017, 3:36 AM
netstar added a subscriber: netstar.

This does work between applications (copying)...also...i dont think middle button or two-button mouse pasting is enabled anymore. AFAIK there were 2 paste buffers (one x11) and another toolkits. Now there's seemingly only one method, i think this should be closed.

netstar reopened this task as Open.Aug 31 2017, 7:36 AM

ok .... not resolved.

I don't think this is us, there's a bug report:

https://phab.enlightenment.org/T5995

That maybe the case for newer E/EFL, but presently it works in E 0.21.9 and EFL 1.20.3, in anything but elm_code. Seems like a regression or something broke in git if its not working across the board anymore.

Yeah. I closed that report above.

ajwillia.ms edited projects, added Restricted Project; removed Restricted Project.Sep 20 2017, 2:14 PM
ajwillia.ms moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Sep 26 2017, 4:43 AM
ajwillia.ms edited projects, added Restricted Project; removed Restricted Project.
ajwillia.ms moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
bu5hm4n triaged this task as Normal priority.Jun 11 2018, 2:12 AM
bu5hm4n added a project: Restricted Project.
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:57 AM
zmike edited projects, added efl: widgets; removed Restricted Project.Jun 11 2018, 8:15 AM
netstar closed this task as Wontfix.Sep 6 2018, 2:24 AM

Okay, my thoughts on this:

Firstly the 3rd mouse (emulated) paste is very X11-centric. It's not a behaviour I can see lasting into the future.

Primarily for the second reason which is the clipboard is a completely different one to the elm one we use - there are two clipboards!

It would be simple to add a third-button mouse click that pasted the elm text buffer to the widget, however the continuity of this behaviour when using X11 amongst other applications would break also.

It's super confusing, I don't think this is a bug or an issue we need to address at all.

Am going to close this as I don't think it's a bug or something that needs fixing.