How to use IK on a hand to snap to a point until release?

Hello, my question is how can I set up my character so that using IK I can have them interacting with a switch, with their hand snapping to a set position on a switch, and follows that switch’s movement which is driven by the player?

More info:
I need to be able to make my character grab a switch that they can move up and down, with the hand moving with the switch. Currently the switch is set up and moving when we press ‘e’ on it to interact and move the mouse up and down. The switch snaps to either on or off (up or down) in the sense that it can’t be left somewhere between on or off when the player either moves away or isn’t actively forcing it to one of those positions.

Thanks for the reply. Is there no way to do it without the switch being a skeletal mesh? As in, can you not have the character grabbing onto a point of a mesh (that will be moving / interaction is player driven) - it needs a skeleton?

In that documentation it states “having a character appear to grip and hold onto moving objects” - that would have been much more useful to have than just the foot/ground collision example haha.

Appreciate the response.

you could add a socket to a static mesh and do the same thing, i just thought you would use an animated skeletal mesh for a switch object. you don’t even need the socket, you just need a location vector that you use to set the TwoBoneIK node.