Kent 309 (Key 94) and 256 for 1 (Key 117*, Denly 66*) lead Glamorgan 207 (Riley 4-47) by 358 runs
Kent will start the third day of Glamorgan's final home game of the season with a commanding lead of 358 runs thanks to an unbeaten century from Rob Key as the veteran batsman found the late-season form to suggest his career is not yet spent.
Daniel Bell-Drummond and Joe Denly provided solid support with two fifties as Kent reached 256 for 1 at the SSE Swalec on Thursday.
Glamorgan have only themselves to blame for a poor first-innings batting performance where they were all out for 207, a deficit of 102.
Only Graham Wagg and Craig Meschede were able to counter a steady, but by no means lethal, Kent attack.
The other Glamorgan batsmen contributed to their own downfall with some poor shot selection, and far more application will be needed in the second innings if they are to avoid a heavy defeat.
Glamorgan had resumed their first innings on 65 for four, but they lost a wicket to the second ball of the morning when Andrew Salter (nought) had his off stump removed by Darren Stevens, who then bowled Aneurin Donald.
When Chris Cooke was caught at the wicket off Matthew Hunn for 31, Glamorgan had slumped to 101 for 7, and required a further 59 runs to avoid the follow on.
This was avoided as Wagg (58) and Meschede (33) counter-attacked effectively to share 57 runs for the eighth wicket.
Only Jacques Rudolph has scored more LV= County Championship runs than Wagg for Glamorgan this season, and the all-rounder has now passed 800 runs for the first time in his career.
Glamorgan's bowlers were again ineffective at the start of Kent's second innings as Key and Bell-Drummond set off at a rate of five runs an over.
The 50 and 100-run partnerships were quickly passed, and the opening pair had added 114 in 27 overs before Bell-Drummond, who made 54, was caught at slip pushing forward to Salter's arm ball.
Key played every ball on its merit, and reached his century from 167 balls which included eight fours.
Denly (66 not out) reached his fifty in the same over as Key (117no) and the second-wicket pair will be ready to resume on the third morning having already shared an unbroken partnership of 142.