I've seen this problem before with an old install... and it's working now. If you are using homebrew, it might mean that you also need to upgrade sdl libs.Hello,can you please try pygame 1.9.3 from pip?cheers,On Fri, Mar 3, 2017 at 10:03 AM, Mick O'shey <mickaushy@xxxxxxxxx> wrote:Hello,When I ran the code below on mac os sierra, both of console window and pygame.display window kept focused. Then I typed something, letters went directly to console without going through the key events in the program. Escape key also didn't let me out of the program.However people on irc (all on linux) couldn't reproduce the problem, assuming this could be one of the mac-specific problems.I am using python 3.5.2(pyenv install) with pygame 1.9.2b6. Are there any way to avoid this problem?(please excuse my English mistakes if any)----------import pygamepygame.init()pygame.display.set_mode((100, 100))pygame.display.set_caption('keyname') print('ready. ' + pygame.ver)running = Trueclock = pygame.time.Clock()while running:clock.tick(60)for e in pygame.event.get():# e = pygame.event.wait()if e.type == pygame.QUIT:running = Falseelif e.type == pygame.KEYDOWN:if e.key == pygame.K_ESCAPE:running = Falseelse:keyname = pygame.key.name(e.key)print('key is pressed: ' + keyname)elif e.type == pygame.KEYUP:keyname = pygame.key.name(e.key)print('key is released: ' + keyname)# pygame.display.update()pygame.quit()----------