Alex Wakely top-scored with 65 on what was a testing day at the County Ground, with skipper Adam Rossington making 45 and Matt Coles 41.
Keogh contributed 34 as Northants battled hard after Leicestershire decided they wanted first bowl under cloud-laden skies, and he said: “When you get put in you want to get a reasonable score.
"It was perfect bowling conditions and swung all day, but the way Alex Wakely and Ricardo Vasconcelos (who scored 25) grinded it out in the morning made it easier for us later in the day.
“It was a tough wicket, you never felt in, and there were a few dropped catches so it was a great effort to almost get 300 and we’ve now got plenty to bowl at.”
Leicestershire bowler Chris Wright claimed four for 78, and although he felt they could have dismissed Northants for a smaller total, he was still pleased with the Foxes' day of work.
“We inserted them because of the overhead conditions not because it looked a bad pitch and even though we’d have liked to bowl them out for cheaper it’s still a decent effort," he said.
“We did drop some chances and they’ve got a dangerous middle order and getting them in earlier against a fresher ball would have been useful.
"It would have been nice to get a five-for but we put a team in and bowled them out in the day so we achieved our objective."
Wakely made his first half-century since resigning the Northants captaincy, and his first since scoring 76 on the opening day of the season.
He had a high score in the Championship since then of only 28, and although stepping down as captain didn’t bring immediate reward with an eight-ball duck at Durham in his previous innings, battled well against the Foxes to make important runs against the moving ball.
He arrived in just the sixth over of the morning after the early dismissal of Rob Newton, and flicked Mohammed Abbas through mid-wicket for his first boundary before imperiously pulling Neil Dexter’s first ball through the same region on his way to 36 not out by the lunch.
After the break, another pull brought up a second half-century of the season in 102 balls with eight fours before he was tremendously caught at second slip in Abbas’ first over of a new spell 20 minutes before tea.
Trying to force off the back foot, Wakely flashed an edge towards the cordon where Colin Ackermann stuck up a left hand to claim a fine catch.
It ended a stand of 39 for the fourth wicket - one of several useful stands that Northants compiled.
The ball moved all day on a green-tinged pitch and under heavy cloud and it was difficult to envisage the batsmen ever getting completely on top so to nudge the board along with good purpose - reaching 187 for four at one stage - was a solid effort.
There were few cheap wickets.
Newton fell to the new ball for just five, but everyone else got a start.
Vasconcelos worked hard for 25 before lazily driving to gully. Temba Bavuma was always scratchy but got to 20, then Dieter Klein found his outside edge with a good delivery.
Keogh looked in good touch, striking five boundaries but fell over a full delivery from Chris Wright to be lbw for 34.
The theme continued on a day where it was hard to say any batsmen were really settled.
Skipper Rossington made a breezy 45 - violently pulling Dexter over midwicket and repeating the trick against Klein to raise a first batting point. But Rossington was bowled by Will Davis and it began a slide from 210 for five to 250 for nine as the second new ball claimed three for seven in 13 balls.
But just when Northants were about to be rolled over, Coles, in his second match on loan from Essex, swung 41 in 34 balls including two mighty sixes - one over midwicket and the second over deep square - to almost claim a third batting bonus point before No. 11 Ben Sanderson chipped a catch back to Abbas.
But Coles should have been taken on the deep midwicket fence with the score at 265.
It was one of at least seven catches that Leicestershire missed in a miserable display of fielding. Paul Horton at first slip, wicketkeeper Lewis Hill and Harry Dearden all missed two chances each as the visitors conceded an over par total given the conditions.
Leicestershire were six without loss from three overs in reply at the close.