In another incident, Keys visited the family home and trapped the boy in his room by sliding a set of drawers in front of the door. He then drew the curtains and assaulted the boy.
When questioned by police, Keys said he had been confused sexually at the time.
Keys was one of the longest-serving teachers at Hutt International Boys School, having taught at the Upper Hutt integrated school for 19 years since it was founded in 1991.
He was charged earlier this year and resigned from the school at the end of last term.
Principal Grahame Duffy said the charges were disappointing but he stressed that they were historic.
He said the school would now try to move on.
"We've got students in examinations at the moment - that's a priority for us - and while it is disappointing, we as a community do have to obviously deal with the fall-out and then move forward.''
Mr Duffy said police had informed the school when the charges were first laid.
However, the school was unable to tell parents because Keys' name and occupation were suppressed until today.
Mr Duffy said the school could now "clear the air'' by informing its community and notifying the Teachers' Council.
Keys was remanded on bail after his brief appearance in court today.
He wiped his face with a handkerchief as he stood silently in the dock, dressed in a blue sports jacket.
Defence lawyer Paul Paino entered guilty pleas on Keys' behalf after police agreed to withdraw two charges and enter a new representative charge.
Judge Stephen Harrop indicated Keys would likely be jailed for his offending.
"A sentence of imprisonment is virtually inevitable.''
Keys will be sentenced on December 21.