Nerve wracking! Even once I figured out how to progress, I found myself trying to press Q and D too quickly, which only slowed me down more!
Unfortunately I couldn't figure out how to get over the first pit. It appears you're supposed to jump over it maybe?