Josh Magennis’ own goal on 47 minutes settled an entertaining affair to make it six wins for their past seven games for Kenny Jackett’s troops.
The 25th anniversary of the hosts’ return to The Valley was played in an excellent atmosphere, with 3,870 Blues followers also noisily contributing.
Meanwhile, on the pitch, the visitors were defensively dominant and also missed a penalty during a thoroughly-deserved victory.
And O’Keefe was delighted with the team’s display to defeat the League One promotion chasers.
He said: ‘The boys did well and it was more of a man’s performance – exactly what we’ve needed at this stage of the season.
‘These games are often tight when you go to grounds like that and against teams like that, maybe the odd goal will win it.
‘We’ve not been great at set-pieces for or against, but on Saturday we put in a huge shift, didn’t concede and to get the winner from a set-piece is always delightful.
‘Charlton are a big club with some good players so to go there and win with that support was outstanding.
‘If we want to achieve anything this year we are going to have to go to places like that and get results, otherwise we won’t break into the top six.
‘I think that was a bit of a statement and it is only going to give us confidence. Hopefully we can build on that.’
O’Keefe was involved in the match-winner, along with Magennis getting a touch to Gareth Evans’ free-kick on its way into the net.
And it’s a goal he wants crediting with.
He added: ‘It was a great ball in from Gaz and it missed everyone.
‘I didn’t really know it was coming to me, I didn’t see it until late, and it has brushed off me at the back stick and hit their guy.
‘It came off a bit of both of us, but I’ll claim it. I don’t get many so it’s nice to get that if I can!’
Pompey’s victory would have been more comfortable had Brett Pitman’s 65th minute penalty not been saved by Ben Amos.
As it was, it instead helped lift Charlton and the home following.
O’Keefe said: ‘If we go 2-0 up we probably would have seen that out quite comfortably.
‘On the other hand, they get a bit of a boost from it and think “Hold on, we can get back in this”. That’s just football.
‘Fair play to Brett, he has been outstanding for us so we are not going to moan at him too much.’