Python pygame 模块,KMOD_LCTRL 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用pygame.KMOD_LCTRL

项目:Buffe    作者:bentzinir    | 项目源码 | 文件源码
def _event_handler(self):
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                self._running = False
            elif event.type == pygame.KEYDOWN:
                if event.key == pygame.K_q and pygame.key.get_mods() & pygame.KMOD_LCTRL:
                    self._running = False
                elif event.key == pygame.K_F5:
                    raise GameResetException()
                elif event.key == pygame.K_KP_PLUS:
                    self._fps *= 2
                elif event.key == pygame.K_KP_MINUS:
                    self._fps = max(1,self._fps/2)