Press a key to move a joint?

I’m sorry if this isn’t the right category, but I really don’t know which one to choose.
But is there an add-on or something that’s programmed to make a model move similar to the animatronics in Chuck E Cheese or Showbiz Pizza?
I want something where if you press and hold a certain key, it moves a bone in a way, and when let go of the key, it goes back.

When I press and hold the “A” key, the left arm twists or raises up. When I let go of “A”, it untwists and goes back down.
When I press and hold the “Space” bar, the jaw opens up, when I let go of “Space”, the jaw closes.

I use Blender 2.79b since my laptop is not compatible with Blender 2.8 or later.