He became delusional as he travelled home on a Nitelink bus after downing an apparently spiked drink on a night out.
Keating, of Earlsfort, Southern Cross Road, Bray, pleaded guilty at Dublin District Court to assaulting carer Emilia Majabague and threatening to kill her and head nurse Karen Relevante.
The incident happened at Northbrook Nursing Home, Ranelagh on July 3, 2011.
He ran to the nursing home up the N11 after calling his mother to say "all Dublin's burning, everyone is a zombie".
When his colleagues let him in, he became violent and irrational. He assaulted the carer, who went on to save him from jumping out a window that he had smashed with his fists. The other woman, a nurse, raised the alarm and Keating was arrested.
Neither woman was able to escape during the 45-minute ordeal because they were concerned for the safety of 22 sleeping elderly residents in their care.
The court heard the accused believed a spiked drink led to his "bizarre, unpredictable and entirely out of character" behaviour. Judge Cormac Dunne ordered Keating, now a hairdresser, to carry out 200 hours' community service instead of a six-month jail term.