getc/fread change to character-at-a-time

About Monkey 2 Forums Monkey 2 Programming Help getc/fread change to character-at-a-time

This topic contains 3 replies, has 2 voices, and was last updated by  Hezkore 3 weeks, 1 day ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13406

    Hezkore
    Participant

    Using fread or getc I’m only getting one line at a time (user needs to hit enter)
    How would I change to one character-at-a-time mode?

    Here’s an example (do not run via Ted2Go):

    This works, but you need to hit enter (does not work in Ted2Go)
    But I want it to register the second I hit the first key.

    #13407

    Simon Armstrong
    Participant

    on windows that would be getch() from conio.h

    #13408

    Simon Armstrong
    Participant

    on posix, even yuckier

    #13412

    Hezkore
    Participant

    Ah right you are Simon, thanks!

    Getting it to work on Windows was easy.
    And with a bit of work I’ve managed to get it working on Linux as well.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.