d***@cfl.rr.com
2006-03-31 15:09:40 UTC
I have read much on the subject of these 2 keys. Yet I have not been
able to do what I need to do. I need the backspace key to generate
0x08(^H) and the delete key to generate 0x7f(del) during the execution
of a single application. On all my linux boxes the backspace generates
0x7f(^?) and the del key generates ^[[3~. I need to be able to change
that before I execute my program then change it back when my
application is done. stty does NOT do the job nor does my application
use termdef. I have found a little expect script that does do what I
need. I execute "script program" and the keys come out like I want.
#!/usr/bin/expect
eval spawn -noecho $argv
interact {
\177 {send "\010"}
"\033\[3~" {send "\177"}
However I am really looking for basic Linux commands that can be
executed from the bash shell that will do the same thing or a method of
making my application do it from within its self.
Thanks and regards
Mark
able to do what I need to do. I need the backspace key to generate
0x08(^H) and the delete key to generate 0x7f(del) during the execution
of a single application. On all my linux boxes the backspace generates
0x7f(^?) and the del key generates ^[[3~. I need to be able to change
that before I execute my program then change it back when my
application is done. stty does NOT do the job nor does my application
use termdef. I have found a little expect script that does do what I
need. I execute "script program" and the keys come out like I want.
#!/usr/bin/expect
eval spawn -noecho $argv
interact {
\177 {send "\010"}
"\033\[3~" {send "\177"}
However I am really looking for basic Linux commands that can be
executed from the bash shell that will do the same thing or a method of
making my application do it from within its self.
Thanks and regards
Mark