If you don't want the player to move when you press A or D, look in the tutorial how the player is moving left and right with these buttons and make the changes.
Then make the camera's pan based on the player's pan and not the mouse:
In handle_camera(), replace:
camera.pan -= mouse_force.x * 12 * time_step;
with:
camera.pan = player.pan;