Giter Site home page Giter Site logo

Comments (8)

spenserblack avatar spenserblack commented on June 29, 2024 1

I'm also still experiencing this (see console-rs/console#83 for issue I opened).

To reproduce here:

git clone https://github.com/mitsuhiko/dialoguer.git
cd dialoguer
git checkout 0.8.0
cargo run --example input
rem press shift key

from dialoguer.

pksunkara avatar pksunkara commented on June 29, 2024 1

We have some breaking changes in console which means it will take a bit more time to publish it so that we have more chance to include other breaking changes.

from dialoguer.

Archina avatar Archina commented on June 29, 2024

So i tried to trace down the bug further. It seems this derives from the dependency console. To be more detailed the key_from_key_code function in the windows_term.rs does not seem to handle winapi::um::winuser::VK_SHIFT => Key::Shift. Looking at the code however it seems okay to return Key::Unknown there. However, returning Ok(Key::Unknown) as well when self.is_tty is false seems wrong. It may be beneficial to instead return an actual Err in that case or to resort to an alternative enum value for Key.

Once that change has been made, this project could handle that error case appropriately.

Shall I open an issue at the console project as well?

from dialoguer.

pksunkara avatar pksunkara commented on June 29, 2024

Have you tried with latest dialouger 0.8.0?

from dialoguer.

Archina avatar Archina commented on June 29, 2024

I am quite sure that I was using the master branch for trying out the examples.

On my own project, I was using "0.8.0"

from dialoguer.

pksunkara avatar pksunkara commented on June 29, 2024

Fixed by console-rs/console#96

from dialoguer.

lucasfernog avatar lucasfernog commented on June 29, 2024

Hey @mitsuhiko , nice work on this lib :) I love it and used it on several projects. When is this fix planned to be released?

Thank you :)

from dialoguer.

Sloff avatar Sloff commented on June 29, 2024

I'm also experiencing this issue, using version 0.8.0

from dialoguer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.