I'm not sure why you would go through all that effort, but maybe I'm missing something?

Couldn't you get the same effect by not passing wasd, and passing the arrow keys?
Then just use the arrow keys when you needed to move them as a group.