def METHOD_NAME(self, ev):
    """
    Capture key presses in the current view box. Key presses are used only when mouse mode is RectMode
    The following events are implemented:
    + or = : moves forward in the zooming stack (if it exists)
    - : moves backward in the zooming stack (if it exists)
    Backspace : resets to the default auto-scale
    Parameters
    ----------
    ev: QEvent
        The key press event that was generated
    """
    ev.accept()
    if ev.text() == '-':
        self.scaleHistory(-1)
    elif ev.text() in ['+', '=']:
        self.scaleHistory(1)
    elif ev.key() == Qt.Key.Key_Backspace:
        self.scaleHistory(0)
    else:
        ev.ignore()