incremental movement

I'm trying to use the SmoothDamp function to set up smooth incremental movement for my character on key down. I cant seem to get it to work at all. Is there something I'm doing wrong or can someone recommend another way of being able to move a character X amount of distance over Y amount of frames on keyDown?

private var currVel = Vector3.zero;
private var smoothTime: float = 20;

    if(Input.GetKeyUp("w")){
            Debug.Log("moved");
            var targetPos : Vector3 = Vector3.forward * 2;
            transform.position = Vector3.SmoothDamp(transform.position,targetPos, currVel, smoothTime);
        }

That won't work because GetKeyUp is only true for one frame. Vector3.SmoothDamp isn't a function that runs over time or anything, it returns a value immediately, so it has to be used repeatedly to get movement. See here (it's about Lerp, but the same principle applies).

var start : Transform;
var end : Transform;
function Update () {
    if(Input.GetKeyUp("w")){
        transform.position = Vector3.Lerp(start.position, end.position, Time.time);
    }
}

i think this would be a better way of doing it using the Vector3.Lerp function