code: def _digits(self):
          
          self.number += self.key
          try:
              if self.compact is False:
                  self.top.body.focus_position = \
                      self.items.index(self.items_com[max(int(self.number) - 1, 0)])
              else:
                  self.top.body.focus_position = \
                      self.items.index(self.items[max(int(self.number) - 1, 0)])
          except IndexError:
              self.number = self.number[:-1]
          self.top.keypress(self.size, "")  # Trick urwid into redisplaying the cursor
          if self.number:
              self._footer_start_thread("Selection: {}".format(self.number), 1)
docs: 0-9