cursesmenu/curses_menu.py
def process_user_input(self):
        """
        Gets the next single character and decides what to do with it
        """
        user_input = self.get_input()

        go_to_max = ord("9") if len(self.items) >= 9 else ord(str(len(self.items)))

        if ord('1') <= user_input <= go_to_max:
            self.go_to(user_input - ord('0') - 1)
        elif user_input == curses.KEY_DOWN:
            self.go_down()
        elif user_input == curses.KEY_UP:
            self.go_up()
        elif user_input == ord("\n"):
            self.select()

        return user_input
def process_user_input(self):
        user_input = self.get_input()

        go_to_max = ord("9") if len(self.items) >= 9 else ord(str(len(self.items)))

        if ord('1') <= user_input <= go_to_max:
            self.go_to(user_input - ord('0') - 1)
        elif user_input == curses.KEY_DOWN:
            self.go_down()
        elif user_input == curses.KEY_UP:
            self.go_up()
        elif user_input == ord("\n"):
            self.select()

        return user_input
def process_user_input ( self ) : user_input = self . get_input ( ) go_to_max = ord ( "9" ) if len ( self . items ) >= 9 else ord ( str ( len ( self . items ) ) ) if ord ( '1' ) <= user_input <= go_to_max : self . go_to ( user_input - ord ( '0' ) - 1 ) elif user_input == curses . KEY_DOWN : self . go_down ( ) elif user_input == curses . KEY_UP : self . go_up ( ) elif user_input == ord ( "\n" ) : self . select ( ) return user_input
Gets the next single character and decides what to do with it
Gets the next single character and decides what to do with it