title: How do i fix "break" command doesn't work using keyboard and time input in python?
body: <pre><code>import keyboard, time
  
  print('You can use :smile: on discord if you want to use emojis.')
  write = input('Enter the text you want to autotype:')
  
  def typeman():
  
      time.sleep(1)
      keyboard.write(write)
      keyboard.press_and_release('enter')
  
  while True:
      if keyboard.is_pressed(&quot;w&quot;):
          while True:
              if keyboard.is_pressed(&quot;s&quot;):
                  break
              typeman()
  </code></pre>
  <p>This code used to work a couple of months ago, when I press <code>W</code> it types <code>write</code> variable automatically, when I press <code>S</code> it's supposed to stop, but it doesn't work anymore. how to I fix this, and when it used to work I had to hold <code>S</code> for a while for it to stop, how do I break easier?</p>