ricoskyl
This is all good advice. However, I haven't heard anyone mention that sending MIDI doesn't guarantee that the sounds you hear from the keyboard speakers can or will be triggered reliably from the SONAR recordings. It makes sense that they would, but I wouldn't take it for granted that all of the not all of the consumer-grade keyboards will allow you to 'round trip' the MIDI files you record without some more shenanigans. In other words, like WYSIWYG in the print world, What You Play Might not be What You Get from your keyboard speakers.
The SONAR recordings will presumably be MIDI files as in your original question. If you want to actually record the sounds made by the keyboard internal synth, then you will need to take an audio out from the keyboard and record the audio into an audio track in SONAR. That latter will require an audio interface. somewhere between the keyboard and SONAR. That is a failsafe no brainer way to achieve "WYSIWYG." The downside is that it is very difficult to correct mistakes or repair performances recorded as audio compared to MIDI.
If the keyboard is capable of playing under MIDI control, (clue it has a MIDI in as well as out) then unless it is really odd, the response to receiving MIDI data at its MIDI in should be capable of being identical to receiving the keypress that generates the recorded MIDI data. There are a host of features (keyboard splits, octave adjustments, voice layering, harmonizers, auto tempos etc.) that can mess that up, but it should be possible in most cases to set up the keyboard response to MIDI data in to get it to play what you hear when recording. You are going to have to at least read and understand the manual for your keyboard to figure out those settings/features.
Incidentally, if your wife plays piano, you might find she will be happier with a dedicated stage piano with MIDI capability. MIDI controllers, and even all in one DAW workstations generally have keys that respond more like an accordian than a piano, albeit with somewhat more flexible control of dynamics/velocity. A good keyboard (the mechanical/transducer part) is expensive to manufacture compared to the cheap electronics that actually make the sounds.