Top down movement, strafe while aiming

I want to achieve, when rmb down, charachter faces mouse cursor, and while a or d held, the charachter strafe’s the mouse cursor without getting any closer to it, no matter where cursor is

There is an action called ‘rotate around’, is that similar to what you’re looking for?