0

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.

  • Why not just bind CMD-J or so, something other than CMD-Delete – theonlygusti Nov 13 '19 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). – Gabriel Nov 14 '19 at 18:00
2

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)

  • 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" ] } ``` – Gabriel Nov 14 '19 at 18:03
  • @Gabriel indeed. – theonlygusti Nov 14 '19 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 – Derek Knight Mar 19 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!

To piggyback off the answer from @theonlygusti I have an alternate suggestion. I have also use 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 .