'Get next event from queue.'

def get(self):

    inputHookFunc = c_int.from_address(self.inputHookPtr).value
    Cevent = INPUT_RECORD()
    count = c_int(0)
    while 1:
        if inputHookFunc:
            call_function(inputHookFunc, ())
        status = self.ReadConsoleInputA(self.hin, byref(Cevent), 1, byref(count))
        if (status and (count.value == 1)):
            e = event(self, Cevent)
            log_sock(str(e.keyinfo), 'keypress')
            return e
