code: def calculate_input(self, buffer):
          
          # TODO: This function is unused?
          if TriggerMode.ABBREVIATION in self.modes:
              if self._should_trigger_abbreviation(buffer):
                  if self.immediate:
                      return len(self._get_trigger_abbreviation(buffer))
                  else:
                      return len(self._get_trigger_abbreviation(buffer)) + 1
  
          # TODO - re-enable me if restoring predictive functionality
          #if TriggerMode.PREDICTIVE in self.modes:
          #    if self._should_trigger_predictive(buffer):
          #        return ConfigManager.SETTINGS[PREDICTIVE_LENGTH]
  
          if TriggerMode.HOTKEY in self.modes:
              if buffer == '':
                  return len(self.modifiers) + 1
  
          return self.parent.calculate_input(buffer)
docs: Calculate how many keystrokes were used in triggering this phrase.