Keyboard input

I’m a new QNX user developing my first application. I want to attach a callback to a keyboard input. How can this be done?

Under Photon I assume? In an app or like a hotkey system wide?