It may not be "the" function, but a chain of them. Have
you done the action of interest and then looked at the
CIW and/or the CDS.log file, to see what the command(s)
were, that made it so?
I found that the operation works by loading the following lines:
hiSetBindKey("Layout" "<Key>8" "leRotateCB()") ;;rotate
hiSetBindKey("Layout" "<Key>9" "leSetEnv("orientation" "MY")") ;;sideways orientation
hiSetBindKey("Layout" "<Key>0" "leSetEnv("orientation" "MX")") ;;upside down orientation