Cannot set motor speed in script

I cannot seem to set the motor speed of a motor with this script. I can set it manually from within unity, but it does not work from the script. Here is my code:

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

public class Paddle : MonoBehaviour {
	private Rigidbody2D rb2d;
	private JointMotor2D motor;
	public float speed = 100;
	// Use this for initialization
	void Start () {
		rb2d = GetComponent<Rigidbody2D> ();
		motor = GetComponent<JointMotor2D> ();
	}
	
	// Update is called once per frame
	void Update () {
		if (Input.GetKeyDown ("left"))
			motor.motorSpeed = speed;
	}

	void FixedUpdate ()
	{
		
		
	}
}

In this line :

public float speed = 100;

change it to :

public float speed = 100f;

forget this.

the problem is: there is no key called “left” try this :

  using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class Paddle : MonoBehaviour {
      private Rigidbody2D rb2d;
      private JointMotor2D motor;
      public float speed = 100f;
      // Use this for initialization
      void Start () {
          rb2d = GetComponent<Rigidbody2D> ();
          motor = GetComponent<JointMotor2D> ();
      }
      
      // Update is called once per frame
      void Update () {
          if (Input.GetKeyDown (KeyCode.Space))
              motor.motorSpeed = speed;
      }
      }