title: What is the right way to create multiple wx.AcceleratorEntry() entries and bind functions to them? wxPython
body: <p>currently I'm working on my wxPython final High school project and I am facing another problem
  I would like to bind keystroke combination entries (for example CTRL+S...) to my functions, but I can not achieve the result that would fulfill my expectations.</p>
  
  <p>I've tried this, but the keystrokes were not bound. </p>
  
  <pre><code>accelnum = 2
  
          accelerators = [wx.AcceleratorEntry() for x in range(accelnum)]
  
          accelerators[0].Set(wx.ACCEL_CTRL, ord('S'), 'save')
          accelerators[1].Set(wx.ACCEL_CTRL, ord('E'), 'export')
  
  
          accel=wx.AcceleratorTable(accelerators)
          self.SetAcceleratorTable(accel)
  
  
  def save(self, event):
          # some code...
  
  def export(self, event):
          # some other code...
  </code></pre>
  
  <p>I also tried to set ID to the same ID like i set to my toolbar tools but it says
  that 'id' is not valid argument here. </p>
  
  <p>Thank you very much for for all the advices. R</p>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p>For all wondering what could be wrong, I also used wx.EVT_CHAR_HOOK to detect "DEL" key. When I was rewriting my class second time, I forgot to add EVT_CHAR_HOOK and it worked. Until I added that EVT_CHAR_HOOK back. That means You can not use it simultaneously. So what I did next: </p>
  
  <pre><code>ID_SAVE = wx.NewIdRef()
  ID_EXPORT = wx.NewIdRef()
  ID_DELETE = wx.NewIdRef()
  accelerators = [wx.AcceleratorEntry() for x in range(3)]
  accelerators[0].Set(wx.ACCEL_CTRL, ord('S'), ID_SAVE)
  accelerators[1].Set(wx.ACCEL_CTRL, ord('E'), ID_EXPORT)
  accelerators[2].Set(wx.ACCEL_NORMAL, wx.WXK_DELETE, ID_DELETE)
  
  </code></pre>
  
  <p>to assign also my delete button and it works now</p>