Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prompts/checkbox please make "mouse_support" variable. #57

Open
SAPhRAXsg opened this issue Jun 1, 2019 · 8 comments
Open

prompts/checkbox please make "mouse_support" variable. #57

SAPhRAXsg opened this issue Jun 1, 2019 · 8 comments

Comments

@SAPhRAXsg
Copy link

Hi there

in the libary "prompt_toolkit" wich is used, the variable "mouse_support" is changeable calling function prompt(.., mouse_support=False)
in file ./prompts/checkbox.py the option is hard coded on TRUE.
Is is possible to set this option with an argument?

@CITGuru
Copy link
Owner

CITGuru commented Jun 1, 2019

Yes it is hard coded. You want to be able to change it? Lemme see if that is something needed

@CITGuru
Copy link
Owner

CITGuru commented Jun 1, 2019

If so how would you propose to be done

@gslavin
Copy link

gslavin commented Jun 11, 2019

Not sure about the reporter's use case, but I would like to disable mouse input globally while using PyInquirier.

@CITGuru
Copy link
Owner

CITGuru commented Jun 15, 2019

Thats more of a feature. This is doable.

@mcharrel
Copy link

+1 I'd also like to disable mouse input.

@paddie
Copy link

paddie commented Jul 11, 2019

yes, right now it breaks whenever you select another window and return to the dialog by clicking the body of the terminal. Most inconvenient. A global option would be preferable though.

@btashton
Copy link

It would be nice if this was an optional field in question dict. Right now I am rendering the prompt after a bunch of text that someone might want to copy from before selecting a response.

@awalasz
Copy link

awalasz commented Aug 26, 2021

Hi, there is another issue related to that. If you have a 'list' question, then when clicking to option it's correctly selected but answers are empty and not returned.

questions = [
    {
        'type': 'list',
        'message': 'Select source environment',
        'name': 'env_src',
        'choices': [
            {"name": name, "value": value}
            for name, value in get_connections().items()
        ],
    },
]


answers = prompt(questions, style=style)
print(answers)  # Empty dict if option clicked by mouse
print(answers['env_src']  # raises `KeyError`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants