James Holmes
Accused Aurora theater gunman James Holmes listens at an earlier hearing with public defender Tamara Brady.Reuters

He may have appeared like a demonic Joker from a Batman movie when he mowed down 82 people in a Colorado cinema, but accused murderer James Holmes was a bright, quiet university student, his professor testified at his murder trial.

Holmes, however, who allegedly fatally shot 12 people in his rampage at the Aurora Century cinema in one of the biggest mass killings in American history, was also "cocky," said his teacher.

As a student at the University of Colorado's neuroscience programme, Holmes only spoke when called upon, but always knew the answers, testified assistant professor Achim Klug. Two other professors said Holmes lacked motivation, with one calling him very smart but a "socially immature" student who made "awkward" jokes. The accused killer swivelled uncomfortably in his chair as he listened to the witnesses.

Holmes dropped out of university after failing a key oral exam at the end of his first year just weeks before the July 2012 attack. The professors who gave Holmes the exam said he had problems grasping concepts and with reasoning, according to the Greenfield Reporter.

His main professor, who served as a mentor, Sukumar Vijayaraghavan, met Holmes after the exam and offered him a chance to retake it. But Holmes, showing absolutely no emotion, withdrew instead, which surprised Vijayaraghavan, he testified.

When he was asked by the prosecution if Holmes' demeanour had changed much during the academic year, Vijayaraghavan said no. The question appeared to be an attempt to undermine the defence's contention that Holmes' behaviour grew more erratic because of a worsening mental illness.

If convicted Holmes will face the death penalty. Defense attorneys are arguing that he's innocent because he's schizophrenic and his disease compelled him to commit the crime.