Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

control characters

26 views
Skip to first unread message

David.S...@gmail.com

unread,
Jun 30, 2006, 10:11:24 AM6/30/06
to
I've been looking at the control character's in tty.c with an eye on
extending this some more. However, from experiments it seems like
there's something beyond tty.c that is catching the control
character's. For instance, ^T isn't defined in termios.h, but it looks
like it has the function of toggling the last two character's typed.
So, beyond tty.c, what else is likely to be catching control
characters?

Ben Gras

unread,
Jun 30, 2006, 11:27:25 AM6/30/06
to
All,

> I've been looking at the control character's in tty.c with an eye on
> extending this some more. However, from experiments it seems like
> there's something beyond tty.c that is catching the control
> character's. For instance, ^T isn't defined in termios.h, but it looks
> like it has the function of toggling the last two character's typed.

That is a readline(3)-ism, so in the application.

> So, beyond tty.c, what else is likely to be catching control
> characters?

Nope. Well, IS of course, but even IS requests things from tty..

=Ben


David.S...@gmail.com

unread,
Jun 30, 2006, 2:06:43 PM6/30/06
to

> > character's. For instance, ^T isn't defined in termios.h, but it looks
> > like it has the function of toggling the last two character's typed.
>
> That is a readline(3)-ism, so in the application.

I suspect the shell is doing it. Unfortunately I'm having a hard time
finding the shell's source. It's not part of the minix 3 source
download, and my unix-fu so far has not been up to the task. I'll have
to take another look tonight.


> > So, beyond tty.c, what else is likely to be catching control
> > characters?
>
> Nope. Well, IS of course, but even IS requests things from tty..
>

If I remember correctly, control character's not specifically defined
to do anything in tty.c get passed as part of the character buffer to
the requesting process, right?

Thanks for your help Ben.

Ben Gras

unread,
Jun 30, 2006, 8:19:23 PM6/30/06
to
All,

>> That is a readline(3)-ism, so in the application.
>
> I suspect the shell is doing it.

Yep.

> If I remember correctly, control character's not specifically defined
> to do anything in tty.c get passed as part of the character buffer to
> the requesting process, right?

Yep. And sometimes some other transformations are applied (CR/LF for
instance).

=Ben


student

unread,
Jul 4, 2006, 1:27:36 PM7/4/06
to
Hi ,

Even I am trying to do the same thing ... but I faced the similar
problem.
I tried to figure out in the code ... but still no success
Did any one get a solution for this ??
Please let me know in this regards

Thanks

student

unread,
Jul 4, 2006, 1:27:50 PM7/4/06
to
Hi ,

Even I am trying to do the same thing ... but I faced the similar
problem.
I tried to figure out in the code ... but still no success
Did any one get a solution for this ??
Please let me know in this regards

Thanks

David.S...@gmail.com

unread,
Jul 4, 2006, 5:10:19 PM7/4/06
to

student wrote:
> Hi ,
>
> Even I am trying to do the same thing ... but I faced the similar
> problem.
> I tried to figure out in the code ... but still no success
> Did any one get a solution for this ??
> Please let me know in this regards
>

It looks like the shell, ash, is catching the control keys and
manipulating them based on the functions in the library file
editline.c. I haven't yet figured out how this happens since it seems
like tty.c is at a lower level in the operating system. I haven't
started digging through the shell code yet to see how this happens.

You can see the effects of changes to tty.c and termios.h if you put
the shell in a busy state, such as performing a long find command.

0 new messages