make key as a button

hi,

im using this code to rotate my 3d object

var rotateSpeed = 20.0;

    function Update () {
    transform.Rotate(Vector3.down, Input.GetAxis("Horizontal") * rotateSpeed * Time.deltaTime);

    // Slowly rotate the object around its X axis at 1 degree/second.
    transform.Rotate(Vector3.right, Input.GetAxis("Vertical") * rotateSpeed * Time.deltaTime);
}

i can rotate my objects perfectly with W,A,S,D or the arrows. My quistion is how can i put a Key like W in a gui button. So if you press the gui button(W) it will rotate my object.

greetz

var pos : Rect;
var pos2 : Rect;

function OnGUI()
{
  if (GUI.Button(pos, "RotateLeft"))
  {
    transform.Rotate(Vector3.down, rotateSpeed);
  }
  if (GUI.Button(pos2, "RotateRight"))
  {
    transform.Rotate(Vector3.up, rotateSpeed);
  }
}

If you want continous rotation (press and hold the button) you will have to use a RepeatButton and multiply rotateSpeed by Time.deltaTime.