def __grabHotkeys(self):
c = self.app.configManager<EOL>hotkeys = c.hotKeys + c.hotKeyFolders<EOL>for item in c.globalHotkeys:<EOL><INDENT>if item.enabled:<EOL><INDENT>self.__enqueue(self.__grabHotkey, item.hotKey, item.modifiers, self.rootWindow)<EOL>if self.__needsMutterWorkaround(item):<EOL><INDENT>self.__enqueue(self.__grabRecurse, item, self.rootWindow, False)<EOL><DEDENT><DEDENT><DEDENT>for item in hotkeys:<EOL><INDENT>if item.get_applicable_regex() is None:<EOL><INDENT>self.__enqueue(self.__grabHotkey, item.hotKey, item.modifiers, self.rootWindow)<EOL>if self.__needsMutterWorkaround(item):<EOL><INDENT>self.__enqueue(self.__grabRecurse, item, self.rootWindow, False)<EOL><DEDENT><DEDENT><DEDENT>self.__enqueue(self.__recurseTree, self.rootWindow, hotkeys)<EOL>
Run during startup to grab global and specific hotkeys in all open windows