Keira Knightley does shots, cheats on her boyfriend and dances around with one of those oversized signs used to advertise strip mall accountants in “Laggies.” But there’s one thing audiences won’t get to see the actress do in a ballsy performance that detonates her image as one of the most proper of leading ladies.

The script for “Laggies” called for Knightley to perform an elaborate skateboarding trick, but there were issues with the location, and at any rate, the insurance wouldn’t cover the actress, who was by her own admission no Tony Hawk.

“I got really lucky with that,” said Knightley. “There was supposed to be this big trick where I did this ollie, but I was to sort of jump up and twist it. If you’d given me a year with me breaking every bone in my body, I could have done it. But with two weeks to prepare, it wasn’t possible.”

The skateboarding never made it into the finished film, aside from a few scenes where Knightley sort of gingerly futzes about with a board. But there’s a lot of risk-taking that didn’t end up on the cutting room floor in the story of a woman in her late twenties, who is stuck in a listless relationship and without professional direction. Finding herself in a rut, she befriends a group of high schoolers.

“You normally get this kind of story for a teenager or a very young guy, but I notice in my friendship group of women, we’re all in our late twenties or early thirties, and so many of us have sort of started down a path we don’t want to be on,” she said.

“We’re in an age where we’re told our careers are so important that you must love what you do and it puts more pressure on us to do the right thing,” she added.

Like last summer’s “Obvious Child” and HBO’s “Girls,” “Laggies” is interested in dramatizing a type of female arrested development that had been largely absent from the big and small screen. It’s comedy of discontentment and driftlessness.

“Suddenly women are allowed to be more than one of these idealized, five little cut out parts,” said director Lynn Shelton. “Movies had been creating a lot of female characters that seemed like cardboard cutouts because they were not allowed to be anything less than likable. People didn’t want them to be too flawed or rough around the edges or not having their shit together.”

Audiences will either embrace or reject this new female archetype when “Laggies” debuts in theaters on Oct. 24. It screened at the Toronto Film Festival this week.

Knightley isn’t the only member of the “Laggies” team venturing outside their comfort zone. She is paired with Sam Rockwell, who buttons down the zany side he showed off in films such as “The Way, Way Back,” as the attorney father of one of the girls Knightley befriends.

“I play a lot of anarchists and psychopaths,” said Rockwell. “It’s kind of like putting a time bomb in pink wrapping paper.”

Unsurprisingly, neither star was the first choice for their parts. Rockwell’s role was originally intended for Paul Rudd, while Knightley’s part was supposed to go to Anne Hathaway.

Despite the deviation from his screen persona, the 45-year old Rockwell said his “Laggies” role is very similar to what he’s going through in his own life.

“I thought I’d just embrace that this is a middle-aged character,” he said. “There’s a scene where I have this TheraBand — this green, looks like a dildo kind of rubber thing, but it’s a for Tendinosis or ‘tennis elbow’ and I have that, so I brought that to it.”

Though Knightley has spent much of the previous decade grieving photogenically in films such as “Anna Karenina” and “Atonement,” Shelton said she was inspired to cast the actress because of the comic roles she performed early in her career in “Pirates of the Caribbean” and “Bend it Like Beckham.”

“I remembered her being so physically funny and game,” said Shelton. “She had such comfort in her skin and I always remembered that version of Keira. Years later she’s done all these corseted roles, but the Keira I cast was that one. Her 17-year-old self, basically.”

Given that Knightley plays a woman more comfortable with 17-year-olds than people her own age, it was a case of perfect casting.