The SetKeyinFunction event is specific to Primitive command processing where mdlState_setFunction (when possible) should prefer to update to StateCallback events if available. At this time StateCallback does not provide a replacement for the mdlState_setFunction (STATE_KEYIN, func) event which can be used by applications to process almost any key combination pressed at any almost any point during an application load.
HTH,
Bob