title: Keyboard can not control game display
body: <p>I am trying to build a game by pygame in Pychorm. After I create a game display and try to control it by pygame.event.get(), </p>
  
  <p>the cursor still stays at Pychorm and can't fall into my game screen.
  While I type down, the cursor moves down in Pychorm but not my game object moves down.</p>
  
  <pre><code>#create screen
  screen = pygame.display.set_mode((1200,800))
  #creat game object
  ship = Ship(screen)
  
  while True:        
      gf.check_events(ship)
  
  
  def check_events(ship):
      if event.type == pygame.KEYDOWN:
          if event.key == pygame.K_RIGHT:                
              ship.rect.centerx +=  1
  </code></pre>
  
  <p>How to lock cursor on game screen?</p>