def onSwitchWnd(hotkey): for key in hotKeys: keyVal, modifiers = Gtk.accelerator_parse(key[0]) if keyVal == hotkey.keyVal and modifiers == hotkey.modifiers: switchToWnd(key[1]) return True return False