Ensure the computer is powered off, and connect the keyboard to the USB socket, via a MIDI interface if necessary. Launch Sonar and either create a new project, or load an existing one by clicking on the file menu and selecting either "New" or "Open."
Click on the "Window" menu and open the "Matrix" view. Use the audio browser or Windows Explorer to locate your chosen groove clip, then drag-and-drop it onto an available slot.
Click the ACT button to enable the "Active Controller Technology" mode. This will allow you to assign any controller function to any key on your MIDI controller. With ACT mode enabled, click on the Groove Clip in the Matrix View.
Press a key on your MIDI controller. This will assign the groove clip to that key. Press the ACT button again to exit ACT mode. That key on the controller will now trigger that particular Groove Clip.