To change the type of keys shown in the mini-dopesheet in the timeline, you set the same preferences used by the full dopesheet:
// Marked Parameters Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys",2 ); //Current Character Set Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys", 11 );
So, to toggle between Show Keys > Marked Parameters and Show Keys > Current Character Set, you could do something like this:
var x = Preferences.GetPreferenceValue( "dopesheet.timeline_display_keys" ); x = ( x==2 ) ? 11 : 2; Preferences.SetPreferenceValue( "dopesheet.timeline_display_keys", x );