[fpc-pascal]how-to disable CTRL-C in readkey

2004-07-27 Thread Jose Pascual
Hi,
 
I have a program which use keypressed and readkey (crt unit) 
in linux. When I press CTRL-C readkey return #3. It's okey 
and working but I like to disable this option in keyboard 
subsystem because I want to use my only CTRL-C function. 

I have implemented my function for signal SIGINT but I think 
keyboard subsystem is caching this signal and it doesn't 
reach to the my function.

best regards


___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]how-to disable CTRL-C in readkey

2004-07-27 Thread Michael Van Canneyt


On Tue, 27 Jul 2004, Jose Pascual wrote:

> Hi,
>
> I have a program which use keypressed and readkey (crt unit)
> in linux. When I press CTRL-C readkey return #3. It's okey
> and working but I like to disable this option in keyboard
> subsystem because I want to use my only CTRL-C function.
>
> I have implemented my function for signal SIGINT but I think
> keyboard subsystem is caching this signal and it doesn't
> reach to the my function.

This is correct.

The CRT unit puts the terminal in RAW mode, and then the the CTRL-C
key combination is not mapped to SIGINT any more. (normally the shell
handles this). So if you want to use CTRL-C, just react to key #3.

Michael.

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal