Attached is a profile containing four versions of essentially the same command, which will translate mouse movement to keyboard keypresses.
When the command is started, the current mouse cursor position will be registered, and moving the cursor a specified distance away from that position will trigger the holding and/or releasing of certain keys.
To stop keys being held down, move the cursor back to its starting position.
Note that these commands do not attempt any pseudo analog-to-digital conversion where how fast you move the cursor determines how often a given key is pressed.
Instead it operates basically like a digital (eight-way) joystick, where the absolute position away from the center results in a given constant movement.
By default, only one command is enabled within the profile, which will perform its function of pressing the WASD keys while the Caps Lock key is held down.
The second version will function identically, but press the ZQSD keys for those with a corresponding keyboard layout, instead.
There are also versions for both WASD and ZQSD of an alternate operating mode where pressing the Caps Lock key once will start the command, and pressing the Caps Lock key again will stop it.
If you'd like to use a command other than the default, edit the command that currently has its "When I press keys" option enabled (I.E. doesn't have that grayed out in the command list) and uncheck that option, then edit the command you'd like to use instead and check the "When I press keys" option for that command.
If you'd prefer to use a key other than Caps Lock, you can change the key (combination) assigned to the "When I press keys" option.
No further changes are required; none of the actions check this key.
At the top of each command are the two threshold values: one for left and right, one for up and down. If you find there is too much or too little "deadzone" when moving your mouse cursor, these values can be decreased or increased.
The main limitations of this command are that it's not feasible to show any reference points on screen, so you need to remember where you started, and that any games that force the mouse cursor to stay in the center of the screen (even though the ingame mouse cursor won't show it) will likely not allow this command to function correctly.