If you take a sustain pedal as circled in the picture above and turned it 90 degrees it won't slip. Don't ask me why, but it works.
I use my foot pedal on carpet but it still "walked". I took it's rubber feet off and stuck strips of double-sided Velcro Hooks. The hooks do a reasonable job on carpet but would be useless on any other floor surface.