Skip to content

Checkbox does not work when using Windows #156

Description

@saroad2

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:

  1. Copy the code above
  2. Run it on Windows computer in Power Shell
  3. Check the banana option (that works)
  4. 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

Activity

  1. doubleailes commented on Mar 20, 2022

    @doubleailes

    Seems the same #117
    My work arround is to use numpad arrows

  2. RazvanCretu commented on Apr 5, 2022

    @RazvanCretu

    @doubleailes what if I have a loptop with no numpads?

  3. Cube707 commented on Apr 6, 2022

    @Cube707
    Collaborator

    this will be fixed when magmax/python-readchar#71 gets merged.
    Still waiting though...

  4. zixuan945 commented on Jun 13, 2022

    @zixuan945

    @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

  5. Cube707 commented on Jun 26, 2022

    @Cube707
    Collaborator

    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.

  6. Cube707 commented on Jul 24, 2022

    @Cube707
    Collaborator

    readchar just released a new version that should fix this. Please confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions