In some apps, it makes sense for the app to directly handle keyboard shortcuts which are otherwise bound to system wide combinations. For example, ⌘-Space (normally Spotlight) o
For others looking for a solution for a full-screen app, or if you're willing to take over the full screen, you can use: CGDisplayCapture
It will cause your app to capture all keyboard input and prevent even Spotlight and App switching from being invoked using a keyboard.
import Quartz
// disable keyboard events for all apps, except yours
CGDisplayCapture(CGMainDisplayID())
// reenable keyboard events for other apps
CGDisplayRelease(CGMainDisplayID())
Note: Until the display is released, the app will not receive window/application active/resign events. So, perhaps you can use mouse tracking to release the display while your app is active. Also, even the screensaver/lock screen will be impacted. Make sure to deactivate the capture as needed.
Refs: