I would like to be able to use key modifiers in a program.
I have a wxFrame that contains
EVT_KEY_DOWN (self.Toolbar,1,self.CharEvt)
and a
def CharEvt(self,event): ...
self.CharEvent is indeed triggered by the shift key. self.Toolbar is a
reference to a wxPanel instance controlled by sizers. the wxPanel has
a lot of buttons associated to it.
I can't think of a way to make the buttons understand that shift is
pressed.
this is CharEvt:
def CharEvt (self, event):
if event.ShiftDown():
self.Toolbar.ShiftIsDown = true
else:
self.Toolbar.ShiftIsDown = false
event.Skip()
and sure enough, ShiftIsDown is being set but not reliably, so the
wxButtons can't tell if the shift key is pressed by looking at
self.ShiftIsDown.
any and all help appreciated.
···
--
Rolf Lindgren http://www.roffe.com/
roffe@tag.uio.no