def handleKeyEvent(event): isDown, key, mods, isRepeat = convertKeyEvent(event) if WebBrowser.g_mgr.handleKeyEvent(event): return True else: if isRepeat: if onRepeatKeyEvent(event): return True if g_replayCtrl.isPlaying: if g_replayCtrl.handleKeyEvent(isDown, key, mods, isRepeat, event): return True if constants.IS_CAT_LOADED: import Cat if Cat.handleKeyEventBeforeGUI(isDown, key, mods, event): return True if not isRepeat: InputHandler.g_instance.handleKeyEvent(event) if GUI.handleKeyEvent(event): return True if constants.IS_CAT_LOADED: import Cat if Cat.handleKeyEventAfterGUI(isDown, key, mods, event): return True if not isRepeat: if MessengerEntry.g_instance.gui.isEditing(event): return True inputHandler = getattr(BigWorld.player(), 'inputHandler', None) if inputHandler is not None: if inputHandler.handleKeyEvent(event): return True return False
def handleKeyEvent(event): if OfflineMode.handleKeyEvent(event): return True elif LightingGenerationMode.handleKeyEvent(event): return True else: isDown, key, mods, isRepeat = convertKeyEvent(event) if g_bootcamp.isRunning(): g_bootcamp.handleKeyEvent(event) if WebBrowser.g_mgr.handleKeyEvent(event): return True if g_replayCtrl.isPlaying: if g_replayCtrl.handleKeyEvent(isDown, key, mods, isRepeat, event): return True if isRepeat: if onRepeatKeyEvent(event): return True if constants.IS_CAT_LOADED: import Cat if Cat.handleKeyEventBeforeGUI(isDown, key, mods, event): return True if not isRepeat: InputHandler.g_instance.handleKeyEvent(event) if GUI.handleKeyEvent(event): return True if constants.IS_CAT_LOADED: import Cat if Cat.handleKeyEventAfterGUI(isDown, key, mods, event): return True if not isRepeat: if MessengerEntry.g_instance.gui.handleKey(event): return True inputHandler = getattr(BigWorld.player(), 'inputHandler', None) if inputHandler is not None: if inputHandler.handleKeyEvent(event): return True for handler in g_keyEventHandlers: try: if handler(event): return True except Exception: LOG_CURRENT_EXCEPTION() return False
def handleKeyEvent(event): if OfflineMode.handleKeyEvent(event): return True else: isDown, key, mods, isRepeat = convertKeyEvent(event) if WebBrowser.g_mgr.handleKeyEvent(event): return True if g_replayCtrl.isPlaying: if g_replayCtrl.handleKeyEvent(isDown, key, mods, isRepeat, event): return True if isRepeat: if onRepeatKeyEvent(event): return True if constants.IS_CAT_LOADED: import Cat if Cat.handleKeyEventBeforeGUI(isDown, key, mods, event): return True if not isRepeat: InputHandler.g_instance.handleKeyEvent(event) if GUI.handleKeyEvent(event): return True if constants.IS_CAT_LOADED: import Cat if Cat.handleKeyEventAfterGUI(isDown, key, mods, event): return True if not isRepeat: if MessengerEntry.g_instance.gui.handleKey(event): return True inputHandler = getattr(BigWorld.player(), 'inputHandler', None) if inputHandler is not None: if inputHandler.handleKeyEvent(event): return True for handler in g_keyEventHandlers: try: if handler(event): return True except Exception: LOG_CURRENT_EXCEPTION() return False