lime icon indicating copy to clipboard operation
lime copied to clipboard

Linux ( CPP & Neko) Clipboard doesn't work

Open Shallowmallow opened this issue 3 years ago • 2 comments

Describe the bug If you copy some text from elsewhere, you should be able to paste it in a textfield ( or lime.system.Clipboard.text should be different than null )

To Reproduce Steps to reproduce the behavior:

  1. copy text somewhere else ( not from lime/openfl program, if it's from the program it will work)
  2. trace(lime.system.Clipboard.text)
  3. it is null

Expected behavior It should be the copied text

Targets Linux CPP and NEKO tested Hashlink not tested X11

** Idea to correct ??** This library seems to work https://github.com/waneck/systools on Linux ( Neko crashes but it could not link to to neko)

That's their c https://github.com/waneck/systools/blob/master/project/src/linux/clipboard.c Maybe you could get some inspiration ?

Shallowmallow avatar May 20 '21 11:05 Shallowmallow

I may be wrong but I think lime clipboard works only inside textfield. Can you test to copy/paste from external program inside Input Textfield?

Anyway Lime relies on SDL to use the Clipboard and it is very limited (only text). I'm currently working on an advanced Clipboard (only Windows for now) to copy/paste html, svg and images : https://github.com/loudoweb/native-clipboard

loudoweb avatar May 20 '21 13:05 loudoweb

It works when you copy from the openfl textfield to your other openfl textfeld ( from the same program) . If you open twice the openfl program, you cannot copy from one program to the other. You cannot copy from an external program to the textfield. ( I wouldn't have discovered lime.system.Clipboard.text otherwise ;) )

Nice project ! Indeed it could be a useful extension to plenty of people.

Shallowmallow avatar May 20 '21 13:05 Shallowmallow