Obama speechwriter Cody Keenan in a picture taken for the 2009 White House Correspondents Association dinner. (Pete Souza -- Official White House Photo)

With top speechwriter Jon Favreau leaving the White House, deputy director of speechwriting Cody Keenan is transitioning into the lead role. His first big task -- President Obama's State of the Union Tuesday night.

"It’s a collaborative process between the president and his speechwriter -- in this case, Cody Keenan," White House spokesman Jay Carney said last week. He added that Keenan "will be getting a higher profile in the weeks to come -- internally, anyway."

Favreau will depart March 1, possibly to do some screenwriting.

Keenan has written some of Obama's most memorable speeches, including the president's January 2011 speech at the memorial for victims of the Tucson shooting. (The White House emphasizes that Obama himself put a lot of work into the speech, as he does with all his remarks.)

Keenan worked on Obama's humorous speech for the 2009 White House Correspondents Association dinner, even dressing up like a pirate for the president's presentation. He also wrote Obama's eulogy for the late senator Edward M. Kennedy (D-Mass.). It was a fitting assignment -- Keenan got his political start working on Kennedy's staff in 2003. But a friend once said that Keenan was stuck on the "eulogy and commencement beat."

After working for Kennedy and the Senate Health, Education, Labor and Pensions Committee, the Chicago native and Northwestern graduate went to Harvard's Kennedy School. In 2007 he asked Stephanie Cutter, his colleague from Kennedy's office, about internship opportunities on the Obama campaign. He landed a summer internship with the speechwriting team, working for Favreau.

"Over the summer, we were still introducing Barack to crowds who didn't know who he was," Keenan told the Kennedy School's student newspaper. "We'd sit down and toss around ideas to see what stuck."

At the end of the summer, Keenan left the campaign to finish his public policy degree. "I feared it might be the worst decision I ever made," Keenan later told his alumni newspaper. "I thought, 'They're never going to hire me back.'" But they did. Two days after his commencement, Hillary Rodham Clinton conceded, and Obama's team brought him on as a full-time writer.

Obama is "a writer himself, so he engages at a very deep level on the framing of a speech, on the writing of it and the editing of it and the shaping of it," Carney told reporters last Wednesday. In the most recent "West Wing Week," a White House videographer talked to Keenan about the process.

"Last night we sent him the first draft and just met with him for about an hour, and he likes it, which is a big relief for us," Keenan says in the video. The process, he said, started in November, with members of the team assembling "huge binders" on policy proposals.

A photo released by the White House shows Kennan, Obama and Favreau working together on the speech:

President Obama meets with Cody Keenan and Jon Favreau in the Oval Office, Feb. 5, 2013. (Official White House Photo by Pete Souza)

We'll see the fruits of their labor Tuesday night, at 9 p.m.