#Cannot copy from any electron app
35 messages · Page 1 of 1 (latest)
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?
I have a fairly minimal example in my Electron starter project https://github.com/clubside/electron-shell
neither context menu nor keyboard shortcuts work
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.
yes that is very weird any app that doesn't use electron copy is working and there is something I have to mention it which is after I try to copy the text many times but not a specific times it is just randomly the text copied but just in my clipboard history then i have to choose it from clipboard history
clipboard utility: wl-copy
clipboard history: cliphist
I assume electron-copy is some kind of library?
hmmm I don't understand sorry
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.
sorry but my problem is not while I build an app my problem is that I cannot copy from other's electron apps
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
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.
and it is not just in obsidian this issue with all electron apps
I'm downloading now on Windows.
I just did a ctrl-c and switched to Notepad and did ctrl-v with no issue.
hmmm so is it a linux issue?
Did the same thing with their contextmenu.
You mentioned a clipboard utility wl-copy could that be getting in the way?
neither context menu nor keyboard shortcut works
hmmmm I will try another clipboard utility
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.
that is kind from you thanks I really don't why is that happening and what makes is weird is just happened with electron apps only
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.
this is the utility I use to copy/paste over the os
okay I will try now and tell you what happened
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