Mail Archives: djgpp/2001/07/15/14:34:39
> From: "Matthew Conte" <matt AT conte DOT com>
> Date: Sun, 15 Jul 2001 11:59:05 -0400
>
> > Why don't you simply chain to the previous keyboard handler? That
> > would do what you want, and do it safely, because the previous handler
> > is the one installed by the startup code, which generates SIGINT in
> > any normal DJGPP application.
>
> yes, that does work. unfortunately, all keypresses get passed through
> to the default handler, and i get that annoying "keyboard buffer
> overflow" noise out of the pc-speaker. any way to disable this, yet
> still allow CTRL-C/CTRL-BREAK to pass through?
You have all the cards: just chain to the default handler only when
Ctrl-C or Ctrl-BREAK was pressed. You can detect that using the same
code as the default handler does (see the file src/libc/go32/exceptn.S
in the djlsr203.zip archive). In a nutshell, it looks at the keyscan
code and the shift byte in the BIOS area.
- Raw text -