In Keffer's first election to the Texas House in 2002, he defeated the Democrat Theresa Daniel, 20,764 to 14,786. In that same election John Cornyn was elected to the United States Senate, Rick Perry won his first full term as governor of Texas, and Greg Abbott was elected attorney general to succeed John Cornyn. Daniel was unopposed for the Democratic nomination for the seat, after the incumbent Democrat, Harryette Ehrhardt, declined to seek reelection. Keffer was unopposed for his second term in 2004 but unseated in 2006 by the Democrat Allen Vaught, 16,254 to 15,145. The remaining but critical 3.2 percent was cast for the Libertarian candidate, Chris Jones. While in the House, Keffer served on the House Insurance, Energy Resources, and Rules & Regulations committees. In 2012, after a six-year absence from the legislature, Keffer tried to win the District 114 seat vacated in north Dallas by the retiring Republican Will Ford Hartnett, another Dallas lawyer. Keffer had represented the eastern part of the district when he was the District 107 representative. In the May 29 primary, a third candidate, David Boone polled the critical 1,138 votes, sufficient to force a second round of balloting on July 31 between Keffer, who led in the primary with 4,745 votes, and another Dallas lawyer, the Hispanic Republican activist Jason Villalba, who finished with 4,114 ballots. Keffer and Villalba clashed over who would be the more conservative lawmaker. Keffer carried the backing of U.S. Representative Jeb Hensarling of Texas' 5th congressional district, while Villalba was supported by presidential nominee Mitt Romney and retiring U.S. Senator Kay Bailey Hutchison, who called him "the future", and Dallas MayorTom Leppert. Keffer endorsed a zero-based budgeting approach to control excessive state spending. Villalba said that he could move past partisanship and work with Democrats to increase the number of charter schools and expand educational funding. Keffer questioned, "How do we handle the state’s money? How do we handle the taxpayers' money? What do we have to show for it?" In the Republican runoff, which coincided with the high-profile Ted Cruz-David Dewhurst contest to choose the party nominee to succeed Senator Hutchison, Villalba reversed the order of finish from the primary to defeat Keffer, 6,100 to 5,683. Villalba attributed his victor over Keffer to "shoe leather and determination." In the general election, Villalba defeated Democratic former Representative Carol Kent, 33,970 votes. Kent had served a term in District 102 from 2009 to 2011, having unseated Republican Representative Tony Goolsby in the 2008 general election.