Mail.app how to archive messages with delete key? [duplicate]

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)