Re: [pygame] PyGame user interface widgets
On Sat, 2017-02-25 at 20:21 -0800, Irv Kalb wrote: > - sgc I created this toolkit as a simple, easy-to-use method that doesn't take away control of the event loop (and thus can be dropped into an existing project with almost no effort). So, if that is something that sounds good to you, give it a go. While I haven't had time to work on it for a while (hopefully I'll have the time in the next year or so), I can still provide some support if you have any trouble. Of course, if you prefer the app.run() approach, then it looks like ThorPy may be a good recommendation. signature.asc Description: This is a digitally signed message part
Re: [pygame] [mac OS Sierra] key event not activated
Thank you for quick reply. I just reinstalled SDL from homebrew, and upgraded pygame from pip. But unfortunately, same problem remained even after rebooting. 2017-03-03 18:41 GMT+09:00 René Dudfield : > Hello, > > can you please try pygame 1.9.3 from pip? > > 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. > > > cheers, > > > On Fri, Mar 3, 2017 at 10:03 AM, Mick O'shey 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 pygame >> >> pygame.init() >> >> pygame.display.set_mode((100, 100)) >> pygame.display.set_caption('keyname') >> >> print('ready. ' + pygame.ver) >> running = True >> clock = pygame.time.Clock() >> while running: >> clock.tick(60) >> for e in pygame.event.get(): >> # e = pygame.event.wait() >> if e.type == pygame.QUIT: >> running = False >> elif e.type == pygame.KEYDOWN: >> if e.key == pygame.K_ESCAPE: >> running = False >> else: >> 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() >> -- >> > >
Re: [pygame] [mac OS Sierra] key event not activated
Hello, can you please try pygame 1.9.3 from pip? 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. cheers, On Fri, Mar 3, 2017 at 10:03 AM, Mick O'shey 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 pygame > > pygame.init() > > pygame.display.set_mode((100, 100)) > pygame.display.set_caption('keyname') > > print('ready. ' + pygame.ver) > running = True > clock = pygame.time.Clock() > while running: > clock.tick(60) > for e in pygame.event.get(): > # e = pygame.event.wait() > if e.type == pygame.QUIT: > running = False > elif e.type == pygame.KEYDOWN: > if e.key == pygame.K_ESCAPE: > running = False > else: > 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() > -- >
[pygame] [mac OS Sierra] key event not activated
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 pygame pygame.init() pygame.display.set_mode((100, 100)) pygame.display.set_caption('keyname') print('ready. ' + pygame.ver) running = True clock = pygame.time.Clock() while running: clock.tick(60) for e in pygame.event.get(): # e = pygame.event.wait() if e.type == pygame.QUIT: running = False elif e.type == pygame.KEYDOWN: if e.key == pygame.K_ESCAPE: running = False else: 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() --