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

Using rb-readline in Windows with cygwin/mintty/git for Windows doesn't work #155

Open
danowar2k opened this issue Jan 17, 2019 · 0 comments

Comments

@danowar2k
Copy link

See pry/pry#1442 (comment)

Quote:

The cause seems to be the rb-readline gem, which uses the Win32API:

    @kbhit = Win32API.new("msvcrt", "_kbhit", [], 'I')
[...]
      while (@kbhit.Call == 0)
        # If there is no input, yield the processor for other threads
        sleep(@_keyboard_input_timeout)
      end

kbhit seems to never register the keypresses when using Cygwin or miinTTY, so the rb-readline gem is always in sleep mode.

Seems to be an old problem, see here (from 2012):

http://cygwin.1069669.n5.nabble.com/kbhit-in-a-native-app-run-from-CYGWIN-console-does-not-work-td14287.html

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

1 participant