I'm not the objective-c guy, but after debugging I figured that either the event flags or the keyModifierFlags do not cover the CMD key for example, so the event is discarded.
So as you can see below flags & (keyModifierFlags) is 0x0000000000100000 but keyModifierFlags is 0x00140000