Yes when forward/backward and strafe in a single tick.
Yeah.. I actually use a switch statement that works with a movement state that is created by bitwise ops |= and ^= based on the current key state. This makes it quick and easy to detect when straffing and movement is occuring. It also makes things easy in regard to cancelling movement when say strafeleft and straferight are held down simultaneosly.
You probably will want to make your movement functions accept a speed and depending on what your movement state is pass in the unmodified speed variable or a scaled value.