'gets keypress events and moves/rotates acive shape'

def keypress(self, event):

    step = 1.1
    if event.ControlDown():
        step = 1.05
    kup = [85, 315]
    kdo = [68, 317]
    kzi = [wx.WXK_PAGEDOWN, 388, 316, 61]
    kzo = [wx.WXK_PAGEUP, 390, 314, 45]
    kfit = [70]
    kshowcurrent = [67]
    kreset = [82]
    key = event.GetKeyCode()
    if (key in kup):
        self.layerup()
    if (key in kdo):
        self.layerdown()
    (x, y, _) = self.mouse_to_3d((self.width / 2), (self.height / 2))
    if (key in kzi):
        self.zoom_to_center(step)
    if (key in kzo):
        self.zoom_to_center((1 / step))
    if (key in kfit):
        self.fit()
    if (key in kshowcurrent):
        if ((not self.parent.model) or (not self.parent.model.loaded)):
            return
        self.parent.model.only_current = (not self.parent.model.only_current)
        wx.CallAfter(self.Refresh)
    if (key in kreset):
        self.resetview()
    event.Skip()
