The short answer is don't do it, buy a MIDI keyboard, pads or other input device instead.
The long answer.
The "Give all keystrokes to plug-in" feature is for sending keystrokes that would normally be interpreted by SONAR as shortcuts directly to the plug-in instead. In order to use the PC keyboard as a MIDI input device requires a virtual MIDI keyboard and virtual MIDI cable. There are a few available on the internet but the better solution is to purchase, no matter how inexpensive, a real MIDI input device. Many of them directly connect to the PC via USB. Instead of using a MIDI input device, MIDI can also be entered in SONAR, albeit not in real-time, using the step sequencer, piano roll and staff views.