code: def add_key_binding(self):
          
          def add_binding_decorator(*k, **kw):
              return self.extra_key_bindings.add(*k, **kw)
          return add_binding_decorator
docs: Shortcut for adding new key bindings.
          (Mostly useful for a .ptpython/config.py file, that receives
          a PythonInput/Repl instance as input.)
  
          ::
  
              @python_input.add_key_binding(Keys.ControlX, filter=...)
              def handler(event):
                  ...