/**
* Display menu and capture input
*/
private function display()
{
$this->draw();
while ($this->isOpen() && ($input = $this->terminal->getKeyedInput())) {
switch ($input) {
case 'up':
case 'down':
$this->moveSelection($input);
$this->draw();
break;
case 'enter':
$this->executeCurrentItem();
break;
}
}
}