To do that, all you have to do is assign the ENTER key to the OK button as a shortcut key. You can do that when you edit the command button in the UI editor, or you can do it programmatically with the following call:
SetCtrlAttribute (panel, control, ATTR_SHORTCUT_KEY,VAL_ENTER_VKEY);
Luis
NI