You can scale and manipulate keys by adding and setting falloff values on FCurves. Setting a Fall Off Radius value creates falloff, in frames, on both sides of a selected area of an FCurve. For example, setting Fall Off Radius to a value of 10 creates 10 frames of fall off before and after the selected area.
To add fall off to an FCurve
Fall off is added before and after the selected area of the curve.