Python System 模块,ConsoleKey() 实例源码

我们从Python开源项目中,提取了以下12个代码示例,用于说明如何使用System.ConsoleKey()

项目:PyMal    作者:cysinfo    | 项目源码 | 文件源码
def getkeypress(self):
        '''Return next key press event from the queue, ignoring others.'''
        ck=System.ConsoleKey
        while 1:
            e = System.Console.ReadKey(True)
            if e.Key == System.ConsoleKey.PageDown: #PageDown
                self.scroll_window(12)
            elif e.Key == System.ConsoleKey.PageUp:#PageUp
                self.scroll_window(-12)
            elif str(e.KeyChar)=="\000":#Drop deadkeys
                log_sock("Deadkey: %s"%e)
                return event(self,e)
                pass
            else:
                return event(self,e)
项目:PyMal    作者:cysinfo    | 项目源码 | 文件源码
def make_event_from_keydescr(keydescr):
    def input():
        return 1
    input.KeyChar="a"
    input.Key=System.ConsoleKey.A
    input.Modifiers=System.ConsoleModifiers.Shift
    input.next_serial=input
    e=event(input,input)
    del input.next_serial
    keyinfo=make_KeyPress_from_keydescr(keydescr)
    e.keyinfo=keyinfo
    return e
项目:isf    作者:w3h    | 项目源码 | 文件源码
def getkeypress(self):
        '''Return next key press event from the queue, ignoring others.'''
        ck = System.ConsoleKey
        while 1:
            e = System.Console.ReadKey(True)
            if e.Key == System.ConsoleKey.PageDown: #PageDown
                self.scroll_window(12)
            elif e.Key == System.ConsoleKey.PageUp:#PageUp
                self.scroll_window(-12)
            elif str(e.KeyChar) == "\000":#Drop deadkeys
                log("Deadkey: %s"%e)
                return event(self, e)
            else:
                return event(self, e)
项目:isf    作者:w3h    | 项目源码 | 文件源码
def make_event_from_keydescr(keydescr):
    def input():
        return 1
    input.KeyChar = "a"
    input.Key = System.ConsoleKey.A
    input.Modifiers = System.ConsoleModifiers.Shift
    input.next_serial = input
    e = event(input,input)
    del input.next_serial
    keyinfo = make_KeyPress_from_keydescr(keydescr)
    e.keyinfo = keyinfo
    return e
项目:OWASP-ZSC-API    作者:viraintel    | 项目源码 | 文件源码
def getkeypress(self):
        '''Return next key press event from the queue, ignoring others.'''
        ck = System.ConsoleKey
        while 1:
            e = System.Console.ReadKey(True)
            if e.Key == System.ConsoleKey.PageDown:  #PageDown
                self.scroll_window(12)
            elif e.Key == System.ConsoleKey.PageUp:  #PageUp
                self.scroll_window(-12)
            elif str(e.KeyChar) == "\000":  #Drop deadkeys
                log("Deadkey: %s" % e)
                return event(self, e)
            else:
                return event(self, e)
项目:OWASP-ZSC-API    作者:viraintel    | 项目源码 | 文件源码
def make_event_from_keydescr(keydescr):
    def input():
        return 1

    input.KeyChar = "a"
    input.Key = System.ConsoleKey.A
    input.Modifiers = System.ConsoleModifiers.Shift
    input.next_serial = input
    e = event(input, input)
    del input.next_serial
    keyinfo = make_KeyPress_from_keydescr(keydescr)
    e.keyinfo = keyinfo
    return e
项目:shadowbroker-auto    作者:wrfly    | 项目源码 | 文件源码
def make_event_from_keydescr(keydescr):
    def input():
        return 1
    input.KeyChar = u"a"
    input.Key = System.ConsoleKey.A
    input.Modifiers = System.ConsoleModifiers.Shift
    input.next_serial = input
    e = event(input,input)
    del input.next_serial
    keyinfo = make_KeyPress_from_keydescr(keydescr)
    e.keyinfo = keyinfo
    return e
项目:shadowbroker-auto    作者:wrfly    | 项目源码 | 文件源码
def getkeypress(self):
        '''Return next key press event from the queue, ignoring others.'''
        ck=System.ConsoleKey
        while 1:
            e = System.Console.ReadKey(True)
            if e.Key == System.ConsoleKey.PageDown: #PageDown
                self.scroll_window(12)
            elif e.Key == System.ConsoleKey.PageUp:#PageUp
                self.scroll_window(-12)
            elif str(e.KeyChar)=="\000":#Drop deadkeys
                log_sock("Deadkey: %s"%e)
                return event(self,e)
                pass
            else:
                return event(self,e)
项目:shadowbroker-auto    作者:wrfly    | 项目源码 | 文件源码
def make_event_from_keydescr(keydescr):
    def input():
        return 1
    input.KeyChar="a"
    input.Key=System.ConsoleKey.A
    input.Modifiers=System.ConsoleModifiers.Shift
    input.next_serial=input
    e=event(input,input)
    del input.next_serial
    keyinfo=make_KeyPress_from_keydescr(keydescr)
    e.keyinfo=keyinfo
    return e
项目:themole    作者:tiankonguse    | 项目源码 | 文件源码
def getkeypress(self):
        '''Return next key press event from the queue, ignoring others.'''
        ck = System.ConsoleKey
        while 1:
            e = System.Console.ReadKey(True)
            if e.Key == System.ConsoleKey.PageDown: #PageDown
                self.scroll_window(12)
            elif e.Key == System.ConsoleKey.PageUp:#PageUp
                self.scroll_window(-12)
            elif str(e.KeyChar) == "\000":#Drop deadkeys
                log("Deadkey: %s"%e)
                return event(self, e)
            else:
                return event(self, e)
项目:themole    作者:tiankonguse    | 项目源码 | 文件源码
def make_event_from_keydescr(keydescr):
    def input():
        return 1
    input.KeyChar = "a"
    input.Key = System.ConsoleKey.A
    input.Modifiers = System.ConsoleModifiers.Shift
    input.next_serial = input
    e = event(input,input)
    del input.next_serial
    keyinfo = make_KeyPress_from_keydescr(keydescr)
    e.keyinfo = keyinfo
    return e
项目:shadowbroker-auto    作者:wrfly    | 项目源码 | 文件源码
def getkeypress(self):
        u'''Return next key press event from the queue, ignoring others.'''
        ck = System.ConsoleKey
        while 1:
            e = System.Console.ReadKey(True)
            if e.Key == System.ConsoleKey.PageDown: #PageDown
                self.scroll_window(12)
            elif e.Key == System.ConsoleKey.PageUp:#PageUp
                self.scroll_window(-12)
            elif str(e.KeyChar) == u"\000":#Drop deadkeys
                log(u"Deadkey: %s"%e)
                return event(self, e)
            else:
                return event(self, e)