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

Add some windows hack for getChar #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

jaspervdj
Copy link
Owner

No description provided.

@@ -32,7 +33,7 @@ data PresentationCommand
--------------------------------------------------------------------------------
readPresentationCommand :: IO PresentationCommand
readPresentationCommand = do
k <- readKey
k <- GetKey.getKey
case k of
"q" -> return Exit
"\n" -> return Forward
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried applying these changes over the most recent version in hopes of getting it to work on Windows; testing this out on the first 01.md, it didn't appear to do anything differently. Advancing worked fine, but it was impossible to move backwards on slides.

However, commenting out this particular line and freeing \n seems to resolve some kind of fight between the windows console and getChar, allowing you to write a command and then flush the buffer with enter, making patat usable for me on W10 1809.

@jaspervdj
Copy link
Owner Author

I added some more changes but it still does not work as smoothly as I would like to -- often you need to enter commands twice and I'm really not sure why that is happening.

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

Successfully merging this pull request may close these issues.

None yet

3 participants