This is actually pretty to prevent in most games by just checking the last directional input. Issue is a lot of people are sloppy so developers try to make the DP easier which makes walk forward anything besides DP very difficult or impossible.
Just make DP require a hard :df: and qcfs require a hard :f: