X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fad165036083333e4ad23b3b0e84a012c122cb83..6231770f8935b3a2c5e27a32b9103287076d9191:/wxPython/wx/lib/buttons.py diff --git a/wxPython/wx/lib/buttons.py b/wxPython/wx/lib/buttons.py index ea8fea98b5..11c3e77860 100644 --- a/wxPython/wx/lib/buttons.py +++ b/wxPython/wx/lib/buttons.py @@ -347,14 +347,14 @@ class GenButton(wx.PyControl): def OnKeyDown(self, event): - if self.hasFocus and event.KeyCode() == ord(" "): + if self.hasFocus and event.GetKeyCode() == ord(" "): self.up = False self.Refresh() event.Skip() def OnKeyUp(self, event): - if self.hasFocus and event.KeyCode() == ord(" "): + if self.hasFocus and event.GetKeyCode() == ord(" "): self.up = True self.Notify() self.Refresh() @@ -551,7 +551,7 @@ class __ToggleMixin: event.Skip() def OnKeyUp(self, event): - if self.hasFocus and event.KeyCode() == ord(" "): + if self.hasFocus and event.GetKeyCode() == ord(" "): self.up = not self.up self.Notify() self.Refresh()