code: def _create_snippet_actions(self):
          
          # One action per allowed character.
          for i, char in enumerate(self._snippet_chars):
  
              def _make_func(char):
                  def callback():
                      logger.log(5, "Snippet keystroke `%s`.", char)
                      self.command += char
                  return callback
  
              self.actions.add(name='_snippet_{}'.format(i),
                               shortcut=char,
                               callback=_make_func(char))
  
          self.actions.add(name='_snippet_backspace',
                           shortcut='backspace',
                           callback=self._backspace)
          self.actions.add(name='_snippet_activate',
                           shortcut=('enter', 'return'),
                           callback=self._enter)
          self.actions.add(name='_snippet_disable',
                           shortcut='escape',
                           callback=self.mode_off)
docs: Add mock Qt actions for snippet keystrokes.
  
          Used to enable snippet mode.