`Checkbox` does not work when using Windows
Closed this issue · 6 comments
Description
When trying to use a Checkbox
question, one cannot move the cursor up and down to select the boxes to check.
Example
Consider the following program:
import inquirer
questions = [
inquirer.Checkbox(
"food",
"What do you like to eat?",
choices=["banana", "apple", "ice-creem"]
)
]
answers = inquirer.prompt(questions)
print(answers)
Reproduction steps are:
- Copy the code above
- Run it on Windows computer in Power Shell
- Check the banana option (that works)
- Press the down arrow to move to the second option (that doesn't work)
Additional Information
Windows 10
Python version: 3.9.5
Inquirer version: 2.9.1
Seems the same #117
My work arround is to use numpad arrows
@doubleailes what if I have a loptop with no numpads?
this will be fixed when magmax/python-readchar#71 gets merged.
Still waiting though...
@RazvanCretu @Cube707
Before the official fix, you can replace readchar folder of the attached files readchar.zip to your current python module path.
it's a file copies of magmax/python-readchar#71
or you can checkout that pr and replace it by yourself
I decided to take the time to provide a proper workaround as @magmax is currently not reacting.
Whoever needs an updatet version of python-readchar urgently can install my fix from my fork by using git+https://github.com/Cube707/python-readchar.git@v3.0.6
either in a requirements.txt
file or directly from the comandline as:
pip install git+https://github.com/Cube707/python-readchar.git@v3.0.6
it is marked as version 3.0.6-dev0
, so it will override a existing 3.0.5
installation but will be overriden by a official version 3.0.6
release (when it's released...). See magmax/python-readchar#76 for more information
I am also working on a version 4 of readchar (what @zixuan945 linked to above). As this will intreduce breaking changes and is not fully developed jet, I would not recomend using that version.
readchar
just released a new version that should fix this. Please confirm