Hi, I have an Oxygen 49 and use it in X3 for a variety of applications like controlling volume/pan in tracks, controlling the EQ settings in Pro Channel, and controlling various synth parameters.
I wouldn't waste your time using "Midi Learn" -- Sonar does NOT store these settings between sessions. Instead, set the keyboard up as an ACT controller. Doing this will allow you to use the same physical keyboard to control many different features within Sonar (as described above).
The first step is to install the driver that came with the keyboard (if applicable to your operating system). Next, make sure that the keyboard is detected in Sonar as a MIDI device. Third, you need to add it as an ACT controller and assign it the Oxygen 61 MIDI inputs/outputs. The last step is to load/configure an ACT template to do whatever it is you wish to do. I think X3 comes with an ACT template for the Oxygen 61. I recommend saving a copy with a different name *before* you start editing it with your preferences (so that you preserve the original in case you have to start over). Also, make sure to save your template so that you don't have to repeat this step.
I'm writing all this from memory. If you have trouble following it, let me know and I'll try to give more details when I get home.
Cheers...