RC>RS> Today, while writing a command, I accidentally pressed Ctrl-P.
[...]
RC>RS> Could you change that? Now, people without a printer can
RC>RS> freeze their computer with a single Ctrl-P.

 RC>Actually, there's not much I can do about it.  The Ctrl-P is being
 RC>handled by the BIOS; 4DOS never even sees the key.  (4DOS only makes
 RC>DOS calls to get keystrokes.)  RC> - Rex

  ummm,, there *is* something that can be done about it Rex,
assuming an ANSI driver is loaded the following strings will
program it to intercept the keystrokes *before* they trigger
the problem: (and issue an informative "remark")

echo ^Xe[0;114;"rem [Ctrl] Prnt is disabled.";13p
echo ^Xe[16;"rem Ctrl-P is disabled.";13p

     observe the first intercepts both <print> and <ctrl print>
via the keyboard scan-code, and the second intercepts <ctrl-P> by
it's ASCII value.

     note well that "^Xe" must be replaced by an <esc> either
directly, or (4DOS only:) by entering a _true_ <ctrl-X> in place
of the "^X"'s.
(In most editors you may enter ctrl-X by holding down the alt-key
and entering 24 on the *numeric* keypad; this will generate the
appropriate ASCII value == ctrl-X ;
 If your editor barfs, you can always do a "copy con filename".)

     also note that some of the so=called 'enhanced' ANSI drivers
do *not* support such key-replacement ... but I've implemented it
successfully with the ANSI drivers packaged with DOS 2.0,
TandyDOS 2.11, 3.2, &&-DOS 3.3, 3.31, 3.33 and MS DOS 5.0;

     as Riku notes, the problem is worse under 4DOS because BIOS
nolonger _gets_ second toggle and the *only* option left is to
reboot.  :-[
     Accidental ctrl-P[rint]'s are not generally a problem within
applications pgms since they (should!) be doing their own trapping
 ... Only at the command line is it a problem, and the above
solves it.

((actually the replacement strings above may be tooo long ...
[you can infer that ANSI overwrote his buffer if it crashes you;
I have done-so on occasion]   --my proven technique is to use only
very _short_ replacement strings, and use them to invoke a batch
file [via alias on systems which allow it] which then displays the
actual 'disabled' message  [and issues a couple of beeps]. ))

D*Hoffman
~~

