Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-02

Keyboard echo / Linux

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sakari Nylund OH1KH

Hello!

I've been away from list for some time. My problem is easy (?!!) and might have been said here before.
How ever small search did not give any results, so:

If I write a program (Linux, console, non X) where I have gateway to command to shell using:

Shell( '/bin/sh');
or
Shell (' su ');

I can get command prompt and any given command is working as it should BUT .... there is NO keyboard echo. So everything is a blind typing altough typed commands are passed through system OK. Typing 'exit' will return back to program as should.

Same effect happens if I have program that uses graphic display (for ex. svga 640x480x256) in console mode. It works great BUT .... after finishing program and return to system there is no more keyboard echo, as above.

To get echo back I have to logout system and then log back in again.

I'm sure there is a way to fix this. And also that it is said in somewhere in doc:s, but I just can not search it with right words.

Help, please !

73s Saku ________________________________________________________________ Ilmainen Internet @ http://www.nic.fi/

Reply by email

Michael Van Canneyt
to Sakari Nylund OH1KH
Sakari Nylund OH1KH wrote 27 lines
Hello! I've been away from list for some time. My problem is easy (?!!) and might have been said here before. How ever small search did not give any results, so: If I write a program (Linux, console, non X) where I have gateway to command to shell using: Shell( '/bin/sh'); or Shell (' su '); I can get command prompt and any given command is working as it should BUT .... there is NO keyboard echo. So everything is a blind typing altough typed commands are passed through system OK. Typing 'exit' will return back to program as should. Same effect happens if I have program that uses graphic display (for ex. svga 640x480x256) in console mode. It works great BUT .... after finishing program and return to system there is no more keyboard echo, as above.

If you use the CRT unit, remove it; the CRT unit puts the terminal in raw mode, this is what causes your problem.

Michael.

Reply by email

Sakari Nylund, OH1KH
to Michael Van Canneyt

Yep, it seems to help.
Just wonder if I need some of CRT's functions also. What then :-)

73 !
Saku OH1KH

Michael Van Canneyt wrote 6 lines
> If you use the CRT unit, remove it; the CRT unit puts the terminal in raw mode, this is what causes your problem. Michael.

Reply by email

Jonas Maebe
to Sakari Nylund, OH1KH
OH1KH wrote
Yep, it seems to help. Just wonder if I need some of CRT's functions also. What then :-)

Use the ncrt unit instead. Or manually restore the terminal settings (see crt.pp sources to see what exactly is done at
initializations/finalization)

Jonas

Reply by email

Ken Wright
to Jonas Maebe
you wrote 8 lines
On Mon, 5 Feb 2001, Sakari Nylund, OH1KH wrote: > Yep, it seems to help. > Just wonder if I need some of CRT's functions also. What then :-) Use the ncrt unit instead. Or manually restore the terminal settings (see crt.pp sources to see what exactly is done at initializations/finalization)

When using nCrt, use the procedures, nStop and nStart. When spawning a new process via shell(), etc., first call nStop. This will put the console/terminal back into cooked mode for the new process. After returning, call nStart. This will re-establish ncurses' raw mode.

Ken

Reply by email