I leave my keys in the door about 3-4 times a year too, I have ADHD. Luckily I live in a flat but I used to do it when I lived on a terraced house opening straight onto the street too!
Actually, I don't think it's happened since I started taking medication.
I figured out that it happens when I take my hand off the key while opening the door, which tends to be when I have my hands full of other, awkward/heavy/urgent things. If I don't take my hand off the key, then I automatically move to immediately hang it on the hook. But if I let go of it for some reason then the door can easily get closed and I don't register that the key is still in it and there is no visual clue from the inside of the door.
What helps: Having a hook which I can reach while I still have one foot over the threshold, because this means even if I have a wriggly toddler/heavy box/etc I can put the obstacle down, unlock the door, remove the key and hang it up immediately before picking the item up again. If I have to take even one step inside the house to reach the key hook, the chances of it being forgotten are much higher.
Having a very bright, eyecatching keyring which stands out against the colour of the door - means I (or DC) am more likely to spot that the key is still in the door before closing it.
He could also try a stretchy clip to clip the key to his jeans and not take it off the clip to open the door. If he tries to close the door or walk away from it he won't be able to. He'll need to take the key out first.
(I just realised this is about actually leaving it open but I'll leave this here just in case!)