Archive Apple Mail Messages With Delete Key

I want to be able to "Archive message" in apple's mail app.

I tried doing:
Trigger: HotKey (The delete key)
Action: Menu trigger (The Archive message)

And it works!!!
(I guess keyboardmaestro disables the default action which is deleting the message)

I also limited the group to work only in apple's mail app.

Now the problem is i can't use the delete key for erasing text in messages and so...

So i tried adding a "if then" condition to check if the archive message menu is enabled but it doesn't work. the macro is firing even when it is disabled.

Any ideas?

I think using the delete key like that is ill advised surely? It seems an risky way to do something that could be achieved far easier?
For example by using an 'easy to remember' regular combo that you already use for something and triggering a conflict palette. I appreciate that creates an extra keystroke but I use the all the time and find after a few uses it is surprisingly quick.
The native app has a good hotkey for that anyway in Big Sur. Two in fact; control and command and a, is one of them. What is wrong with that? You could also use a Keyboard Maestro keystroke to trigger the native shortcut if that combo is too cumbersome for you. I thought the general feeling here is that it is unwise to use single keys for any kind of shortcut. I find that is the case as you invariably over trigger with that set up.

I guess you right about the one key triggering thing, but:

  1. I would really like it to work like that :slight_smile:

  2. I Think I will find the right "If" conditions i would really minimize the risk...

Any way that's what i'm trying to do, so if anyone has a suggestion on how to do it, it would be great!

What should work is to find an If/Then condition that can be evaluated when composing a message. I'm running a much older version of OS X, so it may be necessary to adapt this for newer versions of Mail. Running 10.11.6, this works:


The Insert Bulleted List menu item is found under Format > Lists.

I tried this real quick, so it's doable, but you are going to find weird places where this approach will blow up on you. Trying to use the delete key when doing a search in main window, for example. Anyway I used Edit>Start Dictation which appears to be enabled when editing a message, but disabled in the main window.

Thanks everyone!

I guess the main thing i was missing is the "otherwise..." part so that the regular Delete will fire if the condition isn't met. Thank @evanfuchs

Also - Thank you for the "Search" comment - i didn't think about it.

I ended up using the "Paste" menu command as the menu condition so now it works in the mailbox and even when there is a message open, but not when i need the regular delete (like in the search field, composing and so...):

Thank you all very much! works amazing and very convenient!

*Also i edited the macro to work with any language (if anybody needs it :))

Another add-on (if anyone is interested) is to make the message close (only if it is with message open and not when on inbox):

Beno, would you be willing to export the Keyboard Maestro Macro and add it here? I've had this same problem repeatedly.

Create a new macro group and set it so it’s only available in Mail. Then, move your macro to that group. Now none of the if statements are needed.

Here u go.

Sorry for the delay. Life is hard for me right now :slight_smile:

New - Mail.kmmacros (4.2 KB)

Thank you so much! I'm sorry life is hard for you right now. :pray: