Im not sure what you mean by giving the player input, but here’s a guess at how you could try to accomplish something like having the player arms(sword animation) follow the mouse cursor.
You can start by looking at animation blending and IK control of your character. The links are some guides from the Unreal site.
With blending, you can have an input number drive the animation. This is closer to making more animations.
With IK you can have a location drive the direction of your character’s bones and define what bones will react. So in theory you get the mouse world position and have the arms(sword swing) follow the mouse cursor left, right, up etc. Basically have the arms setup with IK when swinging and the rest of the body should follow the original animation