'Initialize an event from the Windows input structure.'

def __init__(self, console, input):

    self.type = u'??'
    self.serial = console.next_serial()
    self.width = 0
    self.height = 0
    self.x = 0
    self.y = 0
    self.char = str(input.KeyChar)
    self.keycode = input.Key
    self.state = input.Modifiers
    log((u'%s,%s,%s' % (input.Modifiers, input.Key, input.KeyChar)))
    self.type = 'KeyRelease'
    self.keysym = make_keysym(self.keycode)
    self.keyinfo = make_KeyPress(self.char, self.state, self.keycode)
