Subject: Re: a line discipline for key-up/-down events
To: None <tech-kern@NetBSD.org>
From: David Young <dyoung@pobox.com>
List: tech-kern
Date: 08/05/2006 17:12:36
On Sat, Aug 05, 2006 at 11:01:27AM +0200, Pavel Cahyna wrote:
> On Sat, Aug 05, 2006 at 03:31:01AM -0500, David Young wrote:
> > I want to control UNIX terminal programs with key-up/-down events, no
> > matter whether they run on the console, in an xterm, or in an ssh session.
> > 
> > It appears there is no existing terminal line discipline where a
> > (pseudo-)terminal passes key-up/-down events to a process.  I will need
> > to add a new termios(4) input processing flag---IKEYUP, say---to activate
> > the events.  Finally, I will need to set the key-up/-down events apart
> > from "normal" input using, say, an escape sequence such as "\377\1".
> > Make sense?
> > 
> > I was surprised that I could found no prior art with Google.  Let me know
> > if someone has added key-up/-down events to a UNIX terminal driver before.
> 
> What does Windows NT do? Their console applications can use key-up/-down
> events. What is interesting is that it works through Telnet too, using the
> VTNT terminal type.

Pavel,

Interesting lead, thanks!  Alas, a quick search reveals no UNIX VTNT
client but Kermit, which does not deal with key-up/-down events, AFAICT.

Dave

-- 
David Young             OJC Technologies
dyoung@ojctech.com      Urbana, IL * (217) 278-3933