System.ConsoleKey

Here are the examples of the python api System.ConsoleKey taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

Example 1

Project: OWASP-ZSC Source File: ironpython_console.py
    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)

Example 2

Project: databus Source File: ironpython_console.py
    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)