It works like a wave...
If the key hits the bottom, the pedal starts moving up
And then down again
And as the pedal hits the bottom, keys can be released.
After a while i guess, it turns into a natural flow..
And then there is the question, when to pedal and when not?
I guess most arrranger players master this technique
As well as the expression pedal