From: Pea Jay <peajay@evobsyniva.com>
To: jdennon@seasurf.net
Cc: linux-assembly@vger.kernel.org
Subject: Re: int 16 ?
Date: Sun, 16 Feb 2003 01:29:49 -0500 [thread overview]
Message-ID: <20030216012949.37412fb2.peajay@evobsyniva.com> (raw)
In-Reply-To: <3E4EB2E2.7DA23F1@seasurf.net>
On Sat, 15 Feb 2003 13:36:34 -0800
Jack Dennon <jdennon@seasurf.net> wrote:
> fetch the next keyboard entry and return immediately with it?
>
> Having stalled out on this, I use curses.
Sadly, the easiest way I've found to do this is to use stty.
First fork and exec 'stty -g' and save it's stdout. It's a special
string that restores the current mode.
Then fork and exec 'stty raw -echo'. This will change all sorts of
things, e.g. you now have to output CRLF instead of just LF on stdout,
the characters aren't automatically echoed to the screen, and of course,
you get characters as soon as they're typed, typing enter gives you
character 13 instead of character 10, etc. Basically, it'll work like
one would expect it to.
Just before your program ends, fork and exec stty with that string you
saved from earlier, and it'll put everything back like it was.
Using stty isn't all bad. Supposedly the reason the ioctls to do this
are undocumented is because they might change, if they ever do, then
once someone fixes stty, your program will be fixed as well.
This even works over telnet, for reasons I'm afraid to think about.
prev parent reply other threads:[~2003-02-16 6:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-14 5:23 int 16 ? dAvId KeDrOsKy
2003-02-14 8:07 ` Rudolf Marek
2003-02-14 20:10 ` Jack Dennon
2003-02-15 18:17 ` Rodrigo F. Baroni
2003-02-15 21:36 ` Jack Dennon
2003-02-16 6:29 ` Pea Jay [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030216012949.37412fb2.peajay@evobsyniva.com \
--to=peajay@evobsyniva.com \
--cc=jdennon@seasurf.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox