If you want to receive key down events globally, then you must set following settings in your mac:
System Preferences ---> Accessibility --> and check the Enable access for assistive devices (atleast for keyboard)
then your system can receive key down events globally.