Smooth movement problem

I currently have three transforms serving as “Lanes” for a character cube. I want the cube to snap to each transform or lane but smoothly, if i use time.deltaTime then it moves smoothly however i’m using a key press so the cube stops in between lanes rather then smoothly finishing the snap. Here is the script.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Playermovement : MonoBehaviour {

    public Transform[] Lanes;

    public GameObject Empty;

    public GameObject Bounce;

    public bool iskeyactive;

    public bool isSpace;



    // Use this for initialization
    void Start () {
        iskeyactive = false;
        isSpace = false;
    }
   
    // Update is called once per frame
    void Update () {


        if (Input.GetKey(KeyCode.S))
        {
            iskeyactive = true;
            if(isSpace == false)
            transform.position = Vector3.MoveTowards(transform.position, Lanes[0].position, 1);
        }

        if (Input.GetKeyUp(KeyCode.S))
        {
            iskeyactive = false;
        }

        if (Input.GetKey(KeyCode.D))
        {
            iskeyactive = true;
            if(isSpace == false)
            transform.position = Vector3.MoveTowards(transform.position, Lanes[1].position, 1);
        }

        if (Input.GetKeyUp(KeyCode.D))
        {
            iskeyactive = false;
        }

        if (Input.GetKey(KeyCode.A))
        {
            iskeyactive = true;
            if(isSpace == false)
            transform.position = Vector3.MoveTowards(transform.position, Lanes[2].position, 1);
        }
        if (Input.GetKeyUp(KeyCode.A))
        {
            iskeyactive = false;
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            if(iskeyactive == false)
            {
                isSpace = true;
                Bounce.transform.localScale = (new Vector3(1, 0.5f, 1));
                Empty.transform.localPosition -= (new Vector3(0, 0.2f));
            }
           
        }
        if (Input.GetKeyUp(KeyCode.Space))
        {
            if(iskeyactive == false && isSpace == true)
            {
                isSpace = false;
                Bounce.transform.localScale = (new Vector3(1, 1f, 1));
                Empty.transform.localPosition += (new Vector3(0, 0.2f));
            }
            if (iskeyactive == true && isSpace == true)
            {
                isSpace = false;
                Bounce.transform.localScale = (new Vector3(1, 1f, 1));
                Empty.transform.localPosition += (new Vector3(0, 0.2f));
            }

        }
    }
}

try this:
have the key press set the targetlane and it’ll constantly move to that target on update. also alot of that code is the same so the KeyCodes are exposed to the inspector and the code is looped over

using UnityEngine;

public class Playermovement : MonoBehaviour 
{
    public KeyCode[] LaneInputs = new KeyCode[]
    {
        KeyCode.S, 
        KeyCode.D,
        KeyCode.A
    };
    public float snapSpeed = 1f;
    public Transform[] Lanes;

    public GameObject Empty;
    public GameObject Bounce;

    private Transform targetLane;
    private static readonly EmptyOffset = new Vector3(0, 0.2f, 0);   
    private static readonly SquashScale = new Vector3(1, 0.5f, 1);
    private static readonly FullScale = Vector3.one;

    void Update () 
    {
        int minSize = Mathf.Min(LaneInputs.Length, Lanes.Length);

        for(int i=0;i<minSize; i++)
        {
            if (Input.GetKeyDown(LaneInputs[i]))
            {
                targetLane = Lanes[i];
            }
        }
       
        if (Input.GetKeyDown(KeyCode.Space))
        {
            Bounce.transform.localScale = SquashScale;
            Empty.transform.localPosition -= EmptyOffset;
        }
        if (Input.GetKeyUp(KeyCode.Space))
        {
            Bounce.transform.localScale = FullScale;
            Empty.transform.localPosition += EmptyOffset;
        }

        if(targetLane != null)
        {
            transform.position = Vector3.MoveTowards(transform.position, targetLane.position, snapSpeed * Time.deltaTime);
        }
    }
}