3

The delete key moves mail to the trash in Apple Mail, which is fine.

But is there a way to make CMD-delete the keyboard shortcut to move the selected message to the archive?

I know there is the shortcut CMD-Ctrl-A , but that is too slow for me. (I spend about 3 hours a day on mail.)

I tried to define the shortcut in System Preferences / Keyboard / shortcuts, but it wouldn't allow me to do it (when I type the shortcut in the "Shortcut text field" , I get the "doh" sound). I also tried Alt-delete and Ctrl-delete, none is allowed.

2
  • Why not just bind CMD-J or so, something other than CMD-Delete
    – user150109
    Commented Nov 13, 2019 at 23:29
  • Yes, something like CMD-J would be my fallback. But CMD-delete would be so much easier to hit: the key is bigger, and I have my finger most of the time on the delete key anyways while doing mail, because with many mails I just have to take notice or "classify" them (to-be-dealt-with later, unimportant).
    – Gab
    Commented Nov 14, 2019 at 18:00

2 Answers 2

5

If you install Karabiner Elements you can add a custom config file in ~/.config/karabiner/assets/complex_modifications called cmd_delete_archives_mail.json for example,

{
  "title": "Map CMD-Delete to Archive in Mail.app",
  "rules": [
    {
      "description": "Map CMD-Delete to Archive in Mail.app",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "delete_or_backspace",
            "modifiers": {
              "all": [
                "fn"
              ]
            }
          },
          "to": [{
            "key_code": "A",
            "modifiers": {
              "all": [
                "left_control",
                "left_command"
              ]
            }
          }],
          "conditions": [
            {
              "type": "frontmost_application_if",
              "bundle_identifiers": [
                "^com\\.apple\\.Mail$"
              ]
            }
          ]
        }
      ]
    }
  ]
}

For me, fn + backspace is delete which is why I wrote it with modifier keys. Maybe you won't do that (maybe your keyboard has a forward_delete key)

3
  • Thanks a lot for the hint! Right, I don't want to Fn key modification. So I would just omit this piece of the son file? ``` "modifiers": { "optional": [ "fn" ] } ```
    – Gab
    Commented Nov 14, 2019 at 18:03
  • @Gabriel indeed.
    – user150109
    Commented Nov 14, 2019 at 18:59
  • 1
    I found this useful, but I had to make a few changes to get it to work (March 2020). No back slashes in the bundle id, key_code is lowercase a, "mandatory" not "all" in the from modifiers, and no "all" before the to modifiers. Maybe the karabiner json format has changed recently. In my case I used left_control where you used fn - for a control backspace Commented Mar 19, 2020 at 23:27
0

I too have found that not having archiving more configurable is terrible. This is an operation that is performed a hundred times a day!

I have used Karabiner Elements and have sacrificed my Caps Lock key to give me many more keyboard shortcuts. Set the Karabiner "Complex Modifications" like this

enter image description here

I then programmed this Keyboard Shortcut in System Preferences|Keyboard|Shortcuts

enter image description here

Now I just press Caps Lock + A to archive.

You must log in to answer this question.

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