lkml.org 
[lkml]   [1997]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tty_io.c - kbd input
   Date: Mon, 10 Feb 1997 17:16:59 -0500
From: Chris Pallotta <chris@allmedia.com>

I am unaware of any "abstraction barriers" I am violating by asking
such questions.

Of course, there's no barriers in actually asking! However, you had
clearly started a design, and were asking a question about how to do a
specific design, as opposed to asking the question of "I want to do X;
how should I best approach it?"

I'm trying to implement a text-to-speech screen reader for linux.
I need to implement a handler in tty_write() (OR con_write(), OR
WHEREVER...) to send the character buffer to the audio device so
it gets spoken. Also, I need to send any keyboard input from the
shell to the audio device as well.

My strong suggestion to you is to ***not*** do this in the kernel. (The
general philosophy is to try to do as much in user-space as possible.)

Instead, write a user-space program which is based on script(1) which
intercepts all tty input going through a pseudo-tty. See the source
code of script(1) or rlogind(8) or telnetd(8) for examples of how to
write a program which uses pseudo-ttys.

This has a couple of advantages. First of all, it doesn't require any
kernel patches. Secondly, it will work for any kind of tty device,
whether it is on a rlogin connection, xterm, or a console.

- Ted

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.039 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site