def METHOD_NAME(self, event):
    key = event.key()
    if event.matches(QKeySequence.Paste):
        # XXX: the menu item should also go down this codepath
        clipboard = QApplication.clipboard()
        mimeData = clipboard.mimeData()
        if mimeData.hasText():
            self._insertUnicodings(mimeData.text())
    elif key == Qt.Key_Left:
        # TODO: we'll probably need to reform this stuff for RTL
        self._layoutManager.caretPrevious()
    elif key == Qt.Key_Right:
        self._layoutManager.caretNext()
    elif key in (Qt.Key_Backspace, Qt.Key_Delete):
        self._layoutManager.delete(forward=(key == Qt.Key_Delete))
    else:
        text = event.text()
        if not _isUnicodeChar(text):
            return
        # text should be just one codepoint, but be safe
        self._insertUnicodings(text)