f you have any spare buttons, ideally with led's, then you could map one of those to a shift 'toggle' to enable/disable scratch mode. would need a tiny bit of scripting but i could help with that.
The wiki says this about the VMS4-mapping:
Vinyl/Keylock - (Does nothing on its own when un-shifted at the moment.) When shifted, toggles key lock.
So there is my spare button. All buttons on the device have a led backlight that can be triggered.
This is how the VMS2 behaves with the bundled version of VirtualDJ according to the manual: By default the jogs work in a typical CDJ-style, temporarily adjusting the pitch when turned during playback. When the "vinyl"-button gets pressed once, it lights up and the software goes into scratch-mode. Makes a lot of sense to me.
I don't use scratching at all. As i mostly spin Indie and garage punk tunes, i have no use for it. As soon as you touch the wheels at all, the music basically stops in mixxx and to me this is just another opportunity to screw up as soon as i touch the wrong wheel by accident. I'm sure it's cool for hiphop djs, but i don't like it at all. The VMS2 comes with some kind of transparent rubber sheet you can wrap around the edges of the wheels, so you can still turn them safely if you only touch them on the edges (i didn't understand what they were good for in the beginning). Still i'd rather have the scratching function turned off completely.
For my own purposes i'd already be satisfied if i could somehow disable it permanently in the script, but i guess there are other people around here who can make good use of the scratching function, so the option to toggle it on and off might be important to them.
When i find some more time, i'll look into the stuff you mentioned, but i don't know how far i can get with it (as i said, no experience with scripting stuff at all).
Thanks for your comments on this.