The 38-year-old star of Spooks, Ashes To Ashes and Upstairs, Downstairs, said her 12-year-old son Myles was 'one click away' from looking at online porn while innocently surfing the net.
And she said that despite all her efforts to keep the dark side of the web at bay, it sometimes feels like a losing battle.
Now Keeley – who is married to fellow actor Matthew McFadyen – is backing a campaign to advise parents on how to keep their children safe on the net.
Keeley told Parentdish: "The other day, I had a conversation with my son and it became apparent that he had clicked on a pop-up on a football site and he had seen some material that was inappropriate for his age. It was adult material.
"He was literally one click away from something I hoped he wouldn't have been aware of and wasn't appropriate for his age. I was very upset about that.
"We do have parental controls, and we are constantly updating, but the internet moves so fast. "You leave them doing one thing, such as watching Bin Weevils and having a lovely time, then the next they're on YouTube – and it's very difficult to get any control over that. If you type in some new movie then you are suddenly looking at something else entirely.
I'm 38 now and it's very difficult having grown up with no mobile phones, no access to anything other than a dictionary and the books we had at school. It's a completely different world.
"My 12 year-old is getting involved with Facebook and the social network. That's the way they connect. You can't deny them that. All you can tell them is what's right and wrong.
"In our family, we're quite relaxed – my kids just know it's something they have to do with mummy and daddy, plus we have their histories to check.
"But we can't stop them using the internet. All three of them have homework where they have to use the interenet. And of course they love playing games, like Bin Weevils, Club Penguin, Moshi Monsters.
"But Myles is now into downloading music and TV programmes, and that's where you can run into problems – they don't know whether what they're downloading is even legal, in some cases.
"That's why I'm supporting the Childnet campaign. It's all about helping to guide parents and teachers in talking to their children and taking note of what they're children are doing online and making sure they are using the internet safely and legally. I've got three nosy internet-surfing children and I want them to be safe."
According to the Childnet research, using pirate websites is a minefield, exposing your computer to viruses and your kids to pop-ups. And seven per cent of children have been exposed to offensive or sexually explicit material instead of the film, TV or music they attempted to access.
Then there is the trolling and bullying aspect of the internet, although Keeley says she hasn't been a target.
"But then I don't actively look at what people say about me online," she said.
"I know people who do and for every nice thing that is said about them, there are lots of others who say something horrid."If they met you in the street they wouldn't say anything they have said on Twitter. They would be nice as pie.
That's the advice I give to my son: don't write anything online that you wouldn't say to somebody's face.
Like most of us, Keeley doesn't believe she has the secret to perfect parenting (although she jokes that she's a 'brilliant, brilliant mum') but just does her best to be 'good enough'.
"I don't believe that anyone has got it sussed. Perhaps if you are on your third or fourth child, you may be on the way to having it sussed," she said.
I'm as good a parent as I can be. I feel terribly guilty about working, about being a good enough parent, but doesn't everyone?
"The second you become a parent you have that stress. It's just something that comes along with having children.
"I remember saying to my mum, 'Which child is the best" Who's your favourite?' "I say to mine I like you all the same, but for different reasons. There are certain things I don't like about all of them and certain things I worship about all of them, and I know they feel the same way about me."
Her set up is a 'very modern family'. Myles is Keeley's son from her first marriage, to Spencer McCallum, and she and Matthew have two children, Maggie, nine, and seven-year-old Ralph.
It seems like ancient history now, but it was widely reported back in 2004 that Keeley had left Spencer when Myles was 20 months old for her Spooks co-star Matthew. Does it create any tension?
"It's been a long time now," she said. "Our family set up works very well. It's a very modern family. My door is always open to my son's father and he and I are still great friends.
"My other children don't question that. It's all they've ever known.
"Once you have a child with somebody you are going to want to be involved in all of those things. You want to be involved in every aspect – school plays, sports days, everything. I would never put a stop to that. You have to be grown up and get on with it."
• Keeley is supporting the launch of a new guide from internet safety charity, Childnet International, to inform parents about enjoying music, film and TV on the internet safely and legally. The free online guide is available at www.childnet.com/downloading.