She spoke of a night he told her of his fantasy to stab a woman “while having sex with her”.
Emer McShea, the mother of Dwyer’s adult son, started a relationship with the accused during their college days.
She recalled, at the Central Criminal Court yesterday, one night when he started talking about his stabbing fantasy.
The State witness said he then started to bring a kitchen knife into their bedroom and would pretend to stab her during sex.
She confirmed he had never actually stabbed her.
Last November, she said, Dwyer had sent a 22nd birthday card to their son Senan.
In the card, read out in court yesterday, Dwyer had stated he was “sure of an acquittal”.
She had noticed her former partner’s handwriting when checking the post, at the time, she said.
Ms McShea said she contacted her son, who requested her to open it. A note inside stated: “Everything going well here. All forensics clear and we are sure of an acquittal now we have a mountain of evidence it was a suicide.”
Ms McShea was giving evidence yesterday on Day 22 of the trial.
Mr Dwyer, aged 42, is charged with murdering Elaine O’Hara at Killakee, Rathfarnham, on August 22, 2012.
Ms O’Hara had been discharged from a mental health hospital on that day.
The father-of-three from Kerrymount Close, Foxrock, Dublin has pleaded not guilty to murdering the childcare worker, aged 36.
Ms McShea testified she had been in a relationship with Dwyer when she was in college in the early 1990s.
She said she gave birth to Senan in 1992.
She also confirmed gardaí had shown her CCTV footage and stills from Ms O’Hara’s apartment block as part of the investigation. She said she was able to identify her former partner on the footage in the months of January, June, July and August 2012.
Senan McShea, meanwhile, testified that he too had identified his father in CCTV images from Ms O’Hara’s home at Belarmine Plaza, Stepaside.
He also confirmed he had given his mother permission to open the card from his father when she had called him last year. He said he then gave her permission to pass the card on to the gardaí.
Mr McShea was asked about July 2012, when his father had contacted him to say he would be near his home in Donegal if he would like to meet.
He confirmed that his father had texted him from an 087 phone number. The accused man’s younger brother, Brendan, said the last time he had met Graham Dwyer was in Cork in September 2013, a month before the Garda investigation commenced.
He said he had met him in Blind Strand in Cork with his father, brother and his brother’s brother-in-law.
The trial has heard Ms O’Hara was last seen in Shanganagh, South Dublin, on the evening of August 22, 2012.
Her skeletal remains were discovered over a year later at Killakee on Friday, September 13, 2013.
A cause of death could not be determined, the court has heard.