Input System - CallbackContext

Reading a recent question, I was reminded of how many tutorials use CallbackContext when they could more simply use InputValue or, indeed, no parameter at all (eg OnJump). It also told me I don’t really understand when CallbackContext is absolutely required.

Can someone give me use cases for it, explaining why simpler methods aren’t sufficient? Thank you!

I haven’t really thought of it and I’m no expert, but I guess using a CallbackContext could be useful in checking what type of input was initialised.

An example from the unity docs using CallbackContext in a void:

void FirePerformed(InputAction.CallbackContext context)
{
    // If SlowTap interaction was performed, perform a charged
    // firing. Otherwise, fire normally.
    if (context.interaction is SlowTapInteraction)
        FireChargedProjectile();
    else
        FireNormalProjectile();
}