US President Barack Obama has spoken out on the sensitive issue of gun control after the Colorado cinema shooting, and called on Democrats, Republicans and community leaders to arrive at a "consensus around violence reduction" across the country.

In his last public remark of a four-day trip that started with a visit to the Aurora, Colorado, hospital where dozens of injured film fans were taken after the shooting rampage that left 12 people dead, Obama told an audience in New Orleans that assault rifles should be keep out of the hands of criminals, fugitives and the mentally ill.

"A lot of gun owners would agree that AK-47s belong in the hands of soldiers, not in the hands of criminals - that they belong on the battlefield of war, not on the streets of our cities," the president said.

He added that steps to restrict the availability of such assault rifles should not be controversial but a matter of common sense.

With gun control always a raw issue in the US, particularly in the last few months before a presidential election, Obama's speech avoided making radical proposals that could upset gun owners and boost Republican opposition.

The president emphasised his support for the US constitution's second amendment - the right to bear arms.

"I - like most Americans - believe that the second amendment guarantees an individual the right to bear arms," Obama said. "We recognise the traditions of gun ownership passed on from generation to generation, that hunting and shooting are part of a cherished national heritage."

Obama said he would continue to work with members of both parties and with religious and civic organisation "to arrive at a consensus around violence reduction".

But he stressed that responsibility for curtailing bloodshed also rests with parents, neighbourhoods and teachers "to make sure our young people don't have that void inside them".

The president's remarks came as a four-year-boy accidentally shot and killed himself in Woodbridge, Virginia, said police.

Cops said the unnamed boy found a shotgun from an unoccupied pickup truck and shot himself in the head.