There is a command to do this, however it is not part of the default distribution. It is user-contributed.
To access the command, you'll need to set-up repack and a repo.
You'll find recent instructions concerning repack with this youtube search -
https://www.youtube.com/results?sear...reaper+reapack
Repos can be found here
https://reapack.com/repos (and elsewhere on google)
The command you're looking for is - [PeloReaper] MIDI: MIDIEditor Toggle key snap(Scale) - and it can be found in the PeloReaper repo.
Enjoy!