Control a constraint with input

I am currently trying to control a hinge angle with input from a keyboard in the sense that “A” will decrease the angle and D will increase it.

Is there any way to implement this?