#Cannot copy from any electron app

35 messages · Page 1 of 1 (latest)

hardy mesa
#

Hello, my problem is that I cannot copy from any electron app (obsidian-discord-brave-etc...)
Distro: Arch Linux

warped kestrel
#

You have to implement a context menu yourself if you want right-click cut/copy/paste but the keyboard shortcuts (ctrl-x, ctrl-c, ctrl-v) should still work without that, have you tried?

hardy mesa
warped kestrel
#

Hmm... well there is no contextmenu by default as I mentioned, weird that the keyboard shortcuts don't work at a system level but they are included in the contextmenu I included in my repo.

hardy mesa
warped kestrel
#

I assume electron-copy is some kind of library?

hardy mesa
warped kestrel
#

Sorry I think I read electron-copy where you wrote "electron copy" 😛 I recommend either copying the single file and adding the one line to main.js from my example to your project or adapting what you see. Let me do a quick edit and I can paste the code here if you prefer rather than looking at the repo.

hardy mesa
#

to be clear obsidian is an electron app so I cannot copy from obsidian

#

if there is a text in obsidian I cannot copy it

warped kestrel
#

h, because they haven't implemented a contextmenu in their app. I guess I'd have to see one to know if it's a case of them deliberately stopping the default system-wide clipboard functions.

hardy mesa
warped kestrel
#

I'm downloading now on Windows.

hardy mesa
#

when I click copy it didn't copy

#

and even I press Ctrl + C

warped kestrel
#

I just did a ctrl-c and switched to Notepad and did ctrl-v with no issue.

hardy mesa
warped kestrel
#

Did the same thing with their contextmenu.

#

You mentioned a clipboard utility wl-copy could that be getting in the way?

hardy mesa
hardy mesa
warped kestrel
#

It's doubtful that it's platform related as those are system-wide APIs that Electron uses so unless something is gettinmg in the way I don't know. I'm afraid I'm in the middle of something otherwise I'd put a keyboard and moiuse on my Ubuntu box and test it for you.

hardy mesa
warped kestrel
#

Try just uninstalling your clipboard utility as a test and just use the system's clipboard. If that fixes it yes you should contact whoever makes the utility and mention it. If it does not solve the problem I will find the time later today to use my Linux box to test Obsidian and the clipboard and see if I get different results.

hardy mesa
hardy mesa
#

very nice it work

#

so the problem from the clipboard utility

#

thanks a lot

#

and sorry for bothering you

#

new noticed thing:
the problem actually from wl-clip-persist not from wl-clipboard
when I use

wl-clip-persist --clipboard regular

the issue happened while when I use

wl-clip-persist --clipboard primary

the issue gone