On 09/09/2017 02:02 PM, Timo Paulssen wrote:
The important part of the page is actually the one titled "Waiting for potential combiners". You'll want to either use binary encoding instead of utf8 (the default) or use an encoding that doesn't have combiners, like latin1 or ascii.


Problem: also from the link:

    method getc(IO::Handle:D: --> Str:D)
    multi sub getc (IO::Handle $fh = $*ARGFILES --> Str:D)

my $character = getc();

or

my $character = $*IN.getc();

or

my $character = $my-input-handle.getc();

Thank you!


Since you need to have an encoding that won't wait for combiners after a key was pressed you'll probably have an open call, for example "/dev/tty".IO.open(:r);

You lost me


You are already using termios to make the terminal "raw"; BTW, you only need either makeraw or the 4 lines of flag setting and unsetting.

Also, the flags you were looking for are in the termios(3) man page. If your system doesn't have it for some reason, have a look at https://linux.die.net/man/3/termios

Will look.  Thank you!

Hope that helps!
   - Timo


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to