title: Disable key entry in Material UI TextField
body: <p>How do I prevent the user from entering values into my Material UI TextField and force them to user the number stepper instead?</p>
  <p>I've tried the following and it does not work.</p>
  <pre><code>import React, { useState } from &quot;react&quot;;
  import ReactDOM from &quot;react-dom&quot;;
  import TextField from &quot;@material-ui/core/TextField&quot;;
  
  function App() {
    const [value, setValue] = useState(&quot;0.0&quot;);
    const handleKeyPress = () =&gt; false;
    return (
      &lt;TextField
        type=&quot;number&quot;
        value={value}
        variant=&quot;outlined&quot;
        inputProps={{
          maxLength: 13,
          step: &quot;2000&quot;
        }}
        onKeyDown={handleKeyPress}
      /&gt;
    );
  }
  
  ReactDOM.render(&lt;App /&gt;, document.querySelector(&quot;#app&quot;));
  </code></pre>