Judge William Sylvester said Holmes, 25, can change his plea to not guilty by reason of insanity later, if he chooses.
A trial start date was set for Aug. 5.
Holmes' parents, Robert and Arlene Holmes, sat silently during the court hearing and left without comment.
Prosecutors have not yet announced whether they will pursue the death penalty for the former graduate student who allegedly walked into a midnight showing of "The Dark Knight Rises" in Aurora, Colo., and opened fire. The July 20 attack left 12 people dead and injured 70.
Holmes has been charged with 166 counts, mostly murder and attempted murder. His lawyers have repeatedly raised questions about his mental health. Prosecutors say Holmes methodically planned the shooting for months.
If Holmes does plead insanity, the proceedings would be prolonged further while he is evaluated by state mental health officials.
The Associated Press contributed to this report.