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

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Jul 27 13:58:05 CEST 2004

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.


More information about the fpc-pascal mailing list