'This routine should capture key presses in the current view box.
Key presses are used only when mouse mode is RectMode
The following events are implemented:
ctrl-A : zooms out to the default "full" view of the plot
ctrl-+ : moves forward in the zooming stack (if it exists)
ctrl-- : moves backward in the zooming stack (if it exists)'

def keyPressEvent(self, ev):

    ev.accept()
    if (ev.text() == '-'):
        self.scaleHistory((-1))
    elif (ev.text() in ['+', '=']):
        self.scaleHistory(1)
    elif (ev.key() == QtCore.Qt.Key_Backspace):
        self.scaleHistory(len(self.axHistory))
    else:
        ev.ignore()
