1

Is it possible to disable the copy-paste feature? I would prefer system-wide, but a solution for a single application would be a good start.

  • Can you tell us what you're trying to prevent? There may be other solutions for that. – ott-- Jun 18 '13 at 20:38
  • I'm trying to prevent myself from using it ;) btw, I'd also be interested in a tool that counts the Cmd-C usages. – c089 Jun 19 '13 at 9:58
  • If the problem is that you occasionally drag/drop something accidentally, understand that if you immediately do Cmd-Z (Ctrl-Z on Windows) it will "undo" your last action (and repeating Cmd-Z several times will undo the last several actions, up to a point). This has rescued me many times. Cmd-Z works in most programs that support copy/paste. – Daniel R Hicks Jun 30 '13 at 11:58
3

You might also disable the pboard process:

launchctl unload -w /System/Library/LaunchAgents/com.apple.pboard.plist

After quitting and reopening applications, pasting should stop working in most contexts. It also makes drag and drop and many services stop working.

You can undo the changes by replacing unload with load or by editing /var/db/launchd.db/com.apple.launchd.peruser.$UID/overrides.plist.

0

Depending on what you are trying to do, you might use a background process that resets the clipboard periodically. For example save this plist as ~/Library/LaunchAgents/disablecopypaste.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd>
<plist version="1.0">
<dict>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>disablecopypaste</string>
    <key>ProgramArguments</key>
    <array>
        <string>osascript</string>
        <string>-e</string>
        <string>repeat
set the clipboard to ""
delay 1
end repeat</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

Then load it with launchctl load ~/Library/LaunchAgents/disablecopypaste.plist or by logging out and back in

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.