Nov 22, '05 06:13:00AM • Contributed by: robg
- In Carbon (Firefox, Excel, Word, Photoshop, etc.) and Java applications: Select the text to drag, click-and-hold the mouse button on the selection, and start dragging.
- In Cocoa applications (anything from Apple, OmniWeb, SubEthaEdit): Select the text to drag, click-and-hold the mouse button on the selection, wait one second, and start dragging.
defaults write -g NSDragAndDropTextDelay -int 100
This changes the delay-before-dragging for all Cocoa applications (the -g means "global domain," or all applications) from its default of 1000 (milliseconds, or one second) to 100, or one tenth of a second. Any currently-running applications must be quit and restarted to see the effect of the changes, but this definitely works.Somewhat coincidentally, I was pointed to this thread on the Mac OS X Hints forum site, which contains a link this entry at Mac Geekery. That story, in turn, links to Apple's own Xcode Expert Preferences Notes as the source of the information. Noted in that document is this tidbit:
Setting this default to a non-positive value will disable drag-and-drop editing.So I tried it, and it's true -- set the value to -100, and you won't be able to drag and drop text in any Cocoa application. Note also that you do not have to do this on a global basis. Instead, you could do something like this:
defaults write com.apple.TextEdit NSDragAndDropTextDelay -int -100
That would disable text dragging in TextEdit. Or if you want to leave it enabled in a certain application, but just want to make it much harder to do, try setting a large positive value:
defaults write com.apple.iPhoto NSDragAndDropTextDelay -int 3000
With that setting in place, you'd have to hold the mouse button for three seconds on any text in iPhoto before it was capable of being dragged.
