Longtime gun control activists and Democratic lawmakers reacted with guarded optimism about Mr. Trump’s comments, but said they remained deeply skeptical that the president would follow through on his promise in the face of opposition from the N.R.A. and many of his conservative supporters.

“Trump has more opinions on gun safety than a Magic 8 Ball,” said John Feinblatt, the president of Everytown for Gun Safety, a leading gun control group. “If he means what he says, he will call Mitch McConnell up and get a pledge from him to bring the Senate back.”

If he doesn’t, Mr. Feinblatt said, “it won’t meet the moment, and it’s a clear cave to the N.R.A.”

It would not be the first time that Mr. Trump’s vacillation resulted in inaction. After ending an Obama-era program for young immigrants known as Dreamers, Mr. Trump said he wanted to protect them, but he repeatedly shifted his position in negotiations with lawmakers, who failed to pass legislation to give the Dreamers legal status.

Since last weekend’s shootings in El Paso and Dayton, some of Mr. Trump’s closest advisers have urged him to support background checks and to try to sway Republicans to join him. He has been in frequent touch with Pat Cipollone, the White House counsel, Kellyanne Conway, counselor to the president, and Eric Ueland, his legislative affairs director. His daughter, Ivanka Trump, has also been involved in discussions with other officials.

The push to get the president to do something took on more urgency after some of his aides conceded that he had been widely seen as failing a key test for a commander in chief by remaining at his private golf club after the El Paso shooting and crashing a wedding there on Saturday night, instead of giving a public address seeking to console a grieving nation.

But opponents of new gun laws wasted little time in trying to pull the president back to their side.

Rush Limbaugh on Friday told his radio listeners that Mr. Trump risks infuriating his base of gun-loving supporters if he makes a deal with Democrats on gun laws, much the way President George Bush did when he broke his promise not to raise taxes.