title: Mac is not recognising key strokes in pygame;
body: <pre><code>for event in pygame.event.get():
      if event.type == pygame.QUIT:
          print('closing the window')
          running = False
  
      # key down for checking if a key is pressed.
  
      if event.type == pygame.KEYDOWN:
          print('some key is pressed')
          if event.type == pygame.K_UP:
              print(&quot;up key is pressed&quot;)
          elif event.type == pygame.K_RIGHT:
              print(&quot;Right key is pressed&quot;)
          elif event.type == pygame.K_w:
              print('w is pressed')
          else:
              print(&quot;does'nt recognize&quot;)
  
      # key up for checking if a key is released.
      if event.type == pygame.KEYUP:
          print('some key is released')
          if event.type == pygame.K_LEFT or event.type == pygame.K_RIGHT:
              print('Keystroke is released')
  </code></pre>
  <p>I ran the code but this is the output:
  some key is pressed
  does'nt recognize
  some key is released
  some key is pressed
  does'nt recognize
  some key is released
  closing the window</p>