Despite the day’s developments, there was deep skepticism in Washington that anything would change because of the long history of inaction by state and federal politicians after similar mass shootings. Gun control activists said they were braced for another disappointing battle with lawmakers.

The president, they noted, promised unwavering fealty last year to the National Rifle Association, drawing thunderous applause at its annual convention by declaring, “To the N.R.A., I can proudly say I will never, ever let you down.” The group in turn enthusiastically endorsed Mr. Trump and spent $30 million on his campaign.

Senator Christopher S. Murphy, Democrat of Connecticut, who sponsored the latest background check measure with Senator John Cornyn, Republican of Texas, said he was unimpressed by Mr. Trump’s openness to it. “Let’s not pretend this is some huge concession on his part,” he said. “If this is all the White House is willing to do to address gun violence, it’s wholly insufficient.”

The background check bill, which seeks to improve the existing database used to prevent gun purchases by criminals and the mentally ill, is a small nod in the direction of gun control that does nothing to close loopholes that allow millions of gun sales without a background check. Last year, N.R.A. officials said they were fine with it.

It is also unclear whether Mr. Trump’s statement of support for the measure, which included a desire for some “revisions,” might be linked to other legislation that the N.R.A. backs. In the House, a similar background check measure was combined with legislation that would effectively allow people to legally carry concealed weapons in all 50 states.

That legislation is the top priority for the N.R.A., and gun control activists have promised to fight it aggressively.