11

I want to use only the delete key in order to delete files in Finder — no key combinations.

So far, I have been unable to find a configuration entry or even a 3rd party app that allow me to change the default behavior of OSX.

I'm using several systems, and OS X is only one of them. Having some consistency is great. I really want that behavior as it seems straightforward to me that the delete key actually delete.

Does someone have a solution?

3
  • but the delete key is really the backspace key.. so does it really make sense to have it delete things?
    – Sam Axe
    Feb 1 '13 at 5:57
  • 1
    On my keyboard, both what is equivalent to backspace and delete key on a PC are labeled delete (this is an apple keyboard).
    – deadalnix
    Feb 1 '13 at 6:05
  • Ah. I've a macbook pro and it only has a single key labeled "delete" - but it actually performs the backspace function.
    – Sam Axe
    Feb 1 '13 at 17:37
4

You can use Karabiner-Elements with a modification rule imported from here:

The following custom rule that maps Delete to Cmd+Backspace:

~/.config/karabiner/assets/complex_modifications/_finder_custom.json

{
  "title": "Finder Custom",
  "rules": [
    {
      "description": "Use Delete as Move to Trash",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "delete_forward",
            "modifiers": {
              "optional": ["any"]
            }
          },
          "to": [
            {
              "key_code": "delete_or_backspace",
              "modifiers": ["left_command"]
            }
          ],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com.apple.finder"
              ]
            }
          ]
        }
      ]
    }
  ]
}

Then open KE and on the Complex Modifications tab, push +Add Rule and then select your rule from the list.

The downside is that if you rename a file using finder and press the delete (forward-delete) it deletes the text from the cursor to the beginning.

Another downside is that if you click a file on your desktop and try to rename and use the delete key to delete some of the filename text, it deletes the file. While I still have this modification in place I do find I am having to remap my brain to use the backspace key when renaming a file and deleting a portion of the text.

https://github.com/tekezo/Karabiner-Elements/issues/1081

0
3

This would make forward delete (fn+delete) move files to trash:

defaults write com.apple.finder NSUserKeyEquivalents -dict-add 'Move to Trash' '\U007F'

It also makes ⌦ move files to trash when renaming files though. The same method doesn't work for delete (⌫).

You could also use KeyRemap4MacBook to change ⌫ to ⌘⌫ in Finder, but it would make renaming files and editing text even more difficult.

Even if you could change it in Finder, there would still be other places where just delete wouldn't work.

4
  • This is clearly a step forward, even if the drawback is quite important. Before I set this up, how can I undo it (if the drawback ends up worse than the problem) ?
    – deadalnix
    Feb 1 '13 at 8:31
  • 1
    Run defaults delete com.apple.finder NSUserKeyEquivalents and relaunch Finder.
    – Lri
    Feb 1 '13 at 8:48
  • This does not work on Mac OS X El Capitan
    – Sébastien
    Oct 31 '16 at 9:54
  • Link for KeyRemap4MacBook seems dead
    – alper
    Jun 21 '20 at 12:16
3

Try presbutan http://briankendall.net/presButan/ it should get you what you want.

3
  • Will try, thanks. I still don't have a solution to this day :)
    – deadalnix
    May 18 '16 at 21:15
  • I can confirm that presButan works for this on Mac OS X El Capitan. It also allows to open files and folders with the enter key
    – Sébastien
    Oct 31 '16 at 9:55
  • This freezes the Finder app.
    – alper
    Jun 21 '20 at 11:46
2

Looks like there are new key combinations that have been included in recent versions of the OS. https://support.apple.com/en-us/HT201236

  • Command-Delete: Move the selected item to the Trash.
  • Shift-Command-Delete: Empty the Trash.
  • Option-Shift-Command-Delete: Empty the Trash without confirmation dialog.
1
  • 2
    Those have been there for ages: and they use what Apple calls the Delete key -- which is the Backspace key! Not the Delete key (on the full keyboard, next to the End key.)
    – benwiggy
    Jan 22 '20 at 10:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .