title: How to fix "TypeError: 'KeyCode' object is not subscriptable"
body: <p>I'm learning about <code>pynput</code> and make this simple code.</p>
  
  <pre><code>from pynput.keyboard import Key, Controller
  from pynput.mouse import Button, Controller
  keyboard = Controller()
  mouse = Controller()
  
  try:
      while True:
          mouse.press(Button.left)
          keyboard.press(Key.shift)
  except KeyboardInterrupt:
      print("Interrupted")
  </code></pre>
  
  <p>And i don't know why this give me a:</p>
  
  <pre><code>TypeError: 'KeyCode' object is not subscriptable
  </code></pre>