'Reimplement Qt Method
Basic keypress event handler
(reimplemented in InternalShell to add more sophisticated features)'

def keyPressEvent(self, event):

    if self.preprocess_keyevent(event):
        return
    self.postprocess_keyevent(event)
