code: def __grabHotkeys(self):
          
          c = self.app.configManager
          hotkeys = c.hotKeys + c.hotKeyFolders
  
          # Grab global hotkeys in root window
          for item in c.globalHotkeys:
              if item.enabled:
                  self.__enqueue(self.__grabHotkey, item.hotKey, item.modifiers, self.rootWindow)
                  if self.__needsMutterWorkaround(item):
                      self.__enqueue(self.__grabRecurse, item, self.rootWindow, False)
  
          # Grab hotkeys without a filter in root window
          for item in hotkeys:
              if item.get_applicable_regex() is None:
                  self.__enqueue(self.__grabHotkey, item.hotKey, item.modifiers, self.rootWindow)
                  if self.__needsMutterWorkaround(item):
                      self.__enqueue(self.__grabRecurse, item, self.rootWindow, False)
  
          self.__enqueue(self.__recurseTree, self.rootWindow, hotkeys)
docs: Run during startup to grab global and specific hotkeys in all open windows