code: def OnPasteAs(self, event):
          
  
          data = self.main_window.clipboard.get_clipboard()
          key = self.main_window.grid.actions.cursor
  
          with undo.group(_("Paste As...")):
              self.main_window.actions.paste_as(key, data)
  
          self.main_window.grid.ForceRefresh()
  
          event.Skip()
docs: Clipboard paste as event handler