'Return next key press event from the queue, ignoring others.'

def getkeypress(self):

    ck = System.ConsoleKey
    while 1:
        e = System.Console.ReadKey(True)
        if (e.Key == System.ConsoleKey.PageDown):
            self.scroll_window(12)
        elif (e.Key == System.ConsoleKey.PageUp):
            self.scroll_window((-12))
        elif (str(e.KeyChar) == u'\x00'):
            log((u'Deadkey:    %s' % e))
            return event(self, e)
        else:
            return event(self, e)
