This is a sample code showing how to map CDJ MIDI Message to X11 Keyboard Events (keystroke).
This example can drive a car in Need For Speed Underground in PCSX2 PS2 Emulation.
Use Jog as wheel-like (press Arrow Keys). Cue for Nitro (press A).
Next to Shift Gear (press Q). FWD / Rev for Gas (press Up Key). Hotcue D for handbrake (press W).
This is dependant of keymap of PCSX2 obviously.