Check for the setmode() function.