There are a few ways to accomplish what you are trying to do. Actually, what you want is to select the joints, not the bones, but that's a different story.
If you select a joint and type "select -hi" either in the script editor or on the command line, Maya will select all the joints below your selection hierarcichally. You can highlight that text and drag it up to your shelf for the "click of a button" operation you want. If you know you want all the joints, select the top of the hierarchy first, then type "select -hi", then drag both lines of text from the script editor to the shelf.
Another way is to set a keyframe on the joints you want, then turn auto-key on (it's the little key icon on the lower left). When you move the timeline and update the rotations and positions of the joints, a new key will automatically be set for all joints you initially keyed manually.
Yet a third way is to select a set of joints and create a "character set" out of them. You can select your "character" in the lower left, then any time you set a key on any member of the character set, all members will be keyframed as well.
Hope this helps you