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?
> 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..
> > 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?
>> 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).
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
David.Stanf...@gmail.com wrote: > 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?
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
David.Stanf...@gmail.com wrote: > 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?
> 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.