Hi Mike,
MIDI IN messages won't get to the OUT unless the keyboard offers an option to have the OUT work as a THRU, in which case messages from the IN should be merged with the messages from the keyboard as you desire.
So long as you don't ever use the keyboard's own sound module, (which I gather you don't if the IN is currently available for a pedal board) this should be okay. Otherwise you'd have to take care to use Local Control to play th onboard sounds, and never Input Echo back to the keyboard.
But this all assumes that the OUT can be configured as a THRU, which is not a super common feature on keyboards. Using the THRU would present the opposite problem that the messages from the keyboard won't appear there.
You could work around this by using two MIDI IN ports (maybe using USB for one or both) and having two MIDI tracks in SONAR - one to echo the notes from the keyboard and one to echo the pedal messages from the pedal board. But then you'd have to record both tracks, and you'd have related mute/solo awkwardness, etc.
I can imagine other Rube Goldberg solutions, but if the keyboard doesn't offer OUT=THRU, I would probably suggest you get a hardware MIDI merger (or multiport MIDI interface with firmware merging capability) and be done with it, assuming the pedal board itself doesn't offer this option where it has an IN for the keyboard and an OUT/THRU that can merge the data streams.
Cheers,
Dave