A Buxton man flashed a woman through her kitchen window, a court heard.
Martin Wright, of Harpur Hill, pleaded guilty to intentionally exposing himself in Buxton on the morning of June 1.
The victim, who cannot be named for legal reasons, said at about 9.30am she saw the 43-year-old defendant outside her home through her kitchen window.
She described how at one point, Wright, of Trent Avenue, was stood outside the back door with his hands down his trousers.
She went to close the French windows and noticed he had started performing a sex act on himself.
John Cooper, prosecuting, said the complainant was “shocked” and “upset”.
Reading her statement, the prosecutor said: “He made me feel very uncomfortable in my own home.”
Kirsten Collings, defending, said her client did not recall the incident, adding: “He could not challenge the account of these witnesses.”
She said there were issues with his level of understanding and requested a psychiatric report be prepared prior to sentencing.
He was released on conditional bail until November 11 and ordered not to contact the victim or her partner.