symfony/symfony — pull request #11326 by florianv (2014-07-05 17:40:40+00:00)
Title: [Console] Added a new helper for choice questions

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |

This a preview PR (no tests have been written yet) that does the following:

- extracted the keyboard detection login from QuestionHelper into an utility
- added a more user friendly question helper for choice questions

## The helper

### Single choice question

![single](https://cloud.githubusercontent.com/assets/1586668/3487190/302e8260-046b-11e4-9940-8241cdde4c3a.png)

You can move up and down with the arrow keys.
To validate your choice press `enter`.

### Multi choice question
![multi](https://cloud.githubusercontent.com/assets/1586668/3487191/3385a27c-046b-11e4-8adb-c2e359b9fc5a.png)

You can move up and down with the arrow keys.
To select / unselect a choice press the `spacebar`.
To validates your choices press `enter`.