kenan2002 / electron-clipboard-ex

47 stars 9 forks source link

Detect copy vs cut on Windows #4

Open erikjalevik opened 2 years ago

erikjalevik commented 2 years ago

Do you have any plans on adding support for detecting whether files were put in the clipboard via a copy or a cut command on Windows?

It should be possible according to this section on "Delete on paste":

https://docs.microsoft.com/en-us/windows/win32/shell/datascenarios?redirectedfrom=MSDN#handling-delete-on-paste-operations

kenan2002 commented 2 years ago

@erikjalevik No, this is currently not planned. Let me check the doc and consider if it should be added. BTW, do you know about the mac counterpart? I am asking because I would like to make every function in this lib cross-platform.

erikjalevik commented 2 years ago

Mac's Finder doesn't actually support cutting files, so it shouldn't be an issue there. Instead they have the concept of "special paste", where you can decide whether to copy or move at the time of pasting.

See: https://www.howtogeek.com/735756/how-to-cut-and-paste-files-on-mac/