How Do U Make An Mc Stay on Button Down?

Im trying to make a button that when u hold down say key D a mc goes to a certain frame and stays untill the key D is released. Thanks!