Unexpected-Keyboard icon indicating copy to clipboard operation
Unexpected-Keyboard copied to clipboard

Clipboard pane

Open Julow opened this issue 1 year ago • 1 comments

This adds the clipboard pane, which allows to save an arbitrary number of clipboards and to paste them later. The key can be disabled in settings.

Checking the "Recently copied text" checkbox will cause the keyboard to keep a temporary history of copied text. This history can only contain 3 elements which expire after 5 minutes. If this is unchecked, only the current system clipboard can be seen.

Ready for testing.

Julow avatar Jun 29 '24 21:06 Julow

hi, this looks good and I think it works as described, although I did not test it extensively.

some thoughts, hopefully impovements ;-)

  • add the delete button between the space bar and the enter button. like in the emoji view.
  • add an insert button to the recent entries. right now you can only save or delete them and you can only insert pinned entries.
  • use ths same icon for removing pinned and recent entries
  • the space bar has keys for switching layouts. what is their use? the emoji view does not have them.
  • the whole pane could be higher or have some handle on top top to change its height as needed. you only see a few lines but a single entry could have multiple lines.
  • maybe move pinned to top and the checkbox and recent entries below. but I guess this would depend on your usage.

alotbsol555 avatar Jul 01 '24 19:07 alotbsol555

Thanks for your review :) That really helped me make the feature better.

The reason for putting the recent entries at the top is that the list of pinned entries is unbounded. Also, it's nice to quickly see whether the keyboard is collecting the history as some people might want to leave the checkbox disabled most of the time. If it was at the bottom, the workflow for pinning the current clipboard would be to scroll the long list before finding it. The history is bounded in length (3 entries) and in time (5 minutes). I'd prefer to keep it like that until I gathered more feedback.

I've made the pane a little taller but I like the idea of a handle at the top. This is definitely out of scope of this PR as it's a large task.

The keyboard switching keys have indeed no use and if it was fixed to work, it wouldn't be very intuitive, so I removed it.

I like the idea of an insert button but I'm a bit afraid to add a textbox dialog within the keyboard. Perhaps that would be solved by switching to a full activity but that seems a bit disrupting. Perhaps a new page in the settings. I'll leave that for later as well.

What do you think of it now ?

Julow avatar Jul 06 '24 12:07 Julow

great, I think this looks really better now!

I like the idea of an insert button but I'm a bit afraid to add a textbox dialog within the keyboard. Perhaps that would be solved by switching to a full activity but that seems a bit disrupting. Perhaps a new page in the settings. I'll leave that for later as well.

I'm afraid this was a misunderstanding, because I wrote "insert" instead of "paste"!? with my second point, I just wanted to suggest adding the paste button to the recently added clipboard entries (the document icon with the arrow, which pastes the pinned entries). this button could be added to the recent entries, which are not yet pinned. You should be able to paste these entries as well, don't you think?

alotbsol555 avatar Jul 06 '24 12:07 alotbsol555

if you want to keep it as simple as possible, you might even remove the delete button for the recent entries. they disappear anyway after 5 minutes, or you can uncheck the checkbox to remove them completely. you would end up with 2 icons everywhere: paste/pin for recent and paste/delete for pinned entries.

alotbsol555 avatar Jul 06 '24 14:07 alotbsol555

That makes total sense! The remove button had a hidden feature, which is to clear the system clipboard if the current system clipboard is removed from the history. That was not very intuitive and I think would be better as a dedicated button.

Thanks again for your help ! I'll merge this now and do incremental improvements over time.

Julow avatar Jul 06 '24 20:07 Julow