To answer your edit requesting Automator help:
Use the Run Shell Script action, Pass input as arguments and the following script:
for f in "$@"
do
rm -rf "$f"
done
You can assign a keyboard shortcut via Application Menu, Services, Services Preferences. It's a bit difficult to assign backspace/"delete" to a keyboard shortcut (see comments on this answer) though.
You can alternatively create an application in Automator, and add a reference to the Finder toolbar (applications can be dragged there).
Assigning a keyboard shortcut using delete (backspace) or forward delete:
- Define a simple keyboard shortcut for the service without delete (e.g.
Cmd-Ctrl-Opt-G
) using System Preferences. Quit System Preferences.
- Open
~/Library/Preferences/pbs.plist
using Property List Editor
and copy the key for the service. It's within NSServicesStatus
and looks something like (null) - Service Name - runWorkflowAsService
. Quit Property List Editor.
Open Terminal and enter the following command (use the line you copied earlier between the quotes and double-quotes):
defaults write pbs NSServicesStatus -dict-add '"(null) - Service Name - runWorkflowAsService"' '{ "key_equivalent" = "@\U0008"; }'
Open Application Menu » Services » Service Preferences, and toggle your service.
- Enjoy your new key combination.
In the command line, @ is Cmd, ^ is Ctrl, $ is Shift, and ~ is Option. Mix and match these modifiers to your preferences. \U0008
is delete (backspace), \U007F
is forward delete.
2maybe with shift? at least that's the way you have to do it on other OS – thejh – 2010-12-15T16:00:22.737