It appears I have to manually type in the name of someone I want to add to my KoS list,
By default it takes your current target and just prompts for a comment. I've frequently added myself to my own KoS list when trying to add somebody following some chat abuse or similar

I'm not aware of being able to configure it to warn you about random enemies in the area, but I knew somebody who used to swear by paranoia (links to Curse).

I can't vouch for that myself though.