#!/usr/bin/env python

import wx

class ListControl(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self,parent,id,title,size=(-1,-1))
        self.set_accelerators()
        self.Raise()
        self.Show()

    def set_accelerators(self):
        print "set_accelerators started"
        EVT_TEST_ID = wx.NewId()

        self.Bind(wx.EVT_MENU, self.on_test_event, id=EVT_TEST_ID)

        aTable = wx.AcceleratorTable([
            (wx.ACCEL_CTRL, ord('L'), EVT_TEST_ID),
            (wx.ACCEL_ALT, ord('L'), EVT_TEST_ID),
            (wx.ACCEL_SHIFT, ord('L'), EVT_TEST_ID),
            (wx.ACCEL_CMD, ord('L'), EVT_TEST_ID),
            (wx.ACCEL_NORMAL, wx.WXK_F3, EVT_TEST_ID),
        ])

        self.SetAcceleratorTable(aTable)

    def on_test_event(self, event):
        print "on_test_event started"

if __name__ == "__main__":

    app = wx.App(redirect=False)
    list_control = ListControl(None, -1, "events")
    app.MainLoop()

