Honestly, I am a Mac developer and I had a really hard time following your question. Without code, the original version could easily be taken as you asking for how to configure the OS, unless you really dug into it.
I've edited your question to try and clarify what you want to do (and given it a much more descriptive title than just "Key strokes Mac"), but even there I couldn't figure out what you were asking at parts. For example, the sentence
I have tried detecting the cmd + shift + eject key combination and
tried adding the same code.
doesn't really make any sense. What code are you talking about here? A clearer question would have avoided this problem to begin with.
As kiamlaluno points out, this was closed by Robert Harvey, a moderator, so no scheme to restrict close votes by area of activity would have worked here. Moderators by definition have almost unlimited power, because they need to handle things that normal users cannot. Odds are, someone who frequents the cocoa tag flagged your question as being off-topic, and Robert responded to that flag. Even though he's not a Mac or iOS developer, I can say that he's done a great job in the related tags there, from my perspective as someone familiar with these topics.
Restricting close votes only to areas that you participate over a certain threshold in would lead to more low-quality content working its way into the system. It's generally pretty easy to recognize garbage questions or completely off-topic material, no matter your area of expertise. I cast a lot of close votes in the facebook tag, for example, as do others, due to the flood of terrible material coming in there lately, but I have answered nothing in that area.