Root bone and walking cycles (how to keep armature in place)
It's simple (if uncomfortable for an animator!).
You have to keyframe the pelvis bone's movement but ONLY on the up/down left/right axis. Don't move it back and forward at all, and your character will walk in place like on a treadmill.
This is annoying because you can't even perceive if the motion is right unless it's actually MOVING around!
So, to save your current project you can go to the timeline or dopesheet side list, pick the track that contains the bone's forward movement, and simply delete it. The bone will keep doing its job as usual, only now it shouldn't move forward anymore.

I tested this on a very complicated rig, full of IKs, so that's why it looks weird, but if you look only at the shoulder bone, after deleting the Z-location it keeps going up and down as normal, it just stopped moving forward.