I'm very much a KM newbie (finally decided to get efficient with my Mac) and was trying to get more efficient with Apple Mail. So I created a set of keyboard driven commands to delete, archive, move within my email list, etc. All was good until I used my friend Command+Space to fire up Alfred and realized the Mail was still the foreground app and my KM macro was still activated and capturing keystrokes. Yikes! I did the right thing and searched the forums finding a number of good articles that unfortunately concluded with "sorry, Mail owns the focus, not Alfred... whomp whomp".
I think things have evolved with KM a bit since then so I thought I would toss this solution out there and 1) see if my assertions are accurate and 2) help others in a similar situation.
Basically what it comes down to is deactivating the active shortcuts within Mail.app. Unfortunately my use case doesn't take into consideration shortcuts that you may want to have on all the time, but for those that you can deactivate, this may be a help.
Let me know if I'm off base on this and thanks to all of you who I've already learned from here on the forums.