title: wxpython: Why can't I check in wx.CheckListBox when Shift Key is down?
body: <p>I intended to make a range of selections when shift key is down. However, when shift key is down, the wx.EVT_CHECKLISTBOX is not triggered. The following is my code:</p>
  
  <pre><code>import wx
  
  class MyFrame(wx.Frame):
      def __init__(self, parent):
          wx.Frame.__init__(self, parent, -1, "Different Frame", size=(300, 300))
          panel = wx.Panel(self)
          sizer = wx.BoxSizer(wx.VERTICAL)
          self.prevIndex = None
          self.shift_down = False
          self.level = wx.CheckListBox(panel, -1)
          levels = ["%s" % i for i in range(9)]
          self.level.SetItems(levels)
          self.level.Bind(wx.EVT_CHECKLISTBOX, self.OnSelectLevel)
          self.level.Bind(wx.EVT_KEY_DOWN, self.onKeyDown)
          self.level.Bind(wx.EVT_KEY_UP, self.onKeyUp)
  
          panel.SetSizer(sizer)
          self.Centre()
          self.Show()
  
      def onKeyDown(self, event):
          print("onKeyDown")
          keycode = event.GetKeyCode()
          if keycode == wx.WXK_SHIFT:
              self.shift_down = True
          else:
              event.Skip()
  
      def onKeyUp(self, event):
          print("onKeyUp")
          keycode = event.GetKeyCode()
          if keycode == wx.WXK_SHIFT: 
              self.shift_down = False
          else:
              event.Skip()
  
      def OnSelectLevel(self, evt):
          print("OnSelectLevel")
          currindex = evt.GetInt()
          currCheckedItems = self.level.GetCheckedItems()
          if self.prevIndex != None and self.shift_down == True:
              if currindex &gt; self.prevIndex:
                  newrange = list(range(self.prevIndex, currindex))
              else:
                  newrange = list(range(currindex, self.prevIndex, -1))
              newCheckedItems = currCheckedItems + newrange
              self.level.SetCheckedItems(newCheckedItems)
              self.prevIndex = currindex
              evt.Skip()
  
  app = wx.App(0)
  frame = MyFrame(None)
  frame.Show()
  app.MainLoop()
  </code></pre>
  
  <p>Is there anyway to trigger the event wx. EVT_CHECKLISTBOX while shift key is down? Thank you.</p>