You can make a two new bindings in your PlayerController for InputComponent to check if your button pressed or released and a bool variable: if pressed, set it true, if not - false. After it, just access this variable (get player controller) from your AnimInstance.