If you can think a practical and effective way to limit this right for criminals without limiting it for the law-abiding, please say what that mechanism is.
That question is a non sequitur. By definition, there is no right to firearms for criminals and no limitation of rights applies to criminals because they don’t obey the law. Limitation of gun rights only applies to the law abiding.
The real question about rights limitations is: Do gun rights for the law abiding help criminals get guns? The answer is mostly no. Research has shown that less than three percent of guns used in crime where obtained legally. You can argue that is still too much and have point. What is debatable is does three percent rise to the level of needing to restrict Constitutional rights, legitimate needs and voter preferences? Also, we can reduce a lot of that three percent using laws that are already on the books. Recent efforts have cut this avenue way down and we could do more. I am all for that.
The main ways violent criminals obtain guns are: black market, particularly through gangs, straw purchases and theft. Theft is really the only angle where law abiding citizens come into play. Interestingly, a lot of the theft is from law enforcement and the military, which would not be subject to additional regulations. Theft from citizens is difficult to mitigate for multiple reasons, but there are things we can do, which I would be all for. Some of these things would also help prevent gun accidents. BTW, that puts me at odds with some pro-gun people.
But to directly answer your question: The way you keep guns from potential violent criminals is to keep potential violent criminals incarcerated. They generally can’t get guns in prison. Repeat offenders, especially those in gangs, are by far the most dangerous. Yet they are routinely let off, given light sentences, paroled and even pardoned for reasons that have nothing to do with protecting society. Just based on the math alone, every year you keep a violent gang member off the street will reduce gun crime.
As for mass shooters, that has to do with mental health. Most mental health patients are actually less likely to commit violent crimes than the general public, but they are more likely to be victims. But there is a small percentage, maybe two percent, who have mental health conditions that can cause violent behavior. Again, the way to keep guns from them is to have them resident in custodial institutions. It is better for them and safer for society.
So that is the mechanism.