[comp.sys.amiga.tech] RAWKEYs, etc.

ng@pur-phy (Nicholas J. Giordano) (08/19/88)

In article <11640005@hpfcdc.HP.COM> cunniff@hpfcdc.HP.COM (Ross Cunniff) writes:
>This thought just struck me, after struggling with DeadKeyConvert for
>the n'th time:
>
>	Why not add the feature to Intuition that, when both
>	RAWKEY and VANILLAKEY are specified in an IDCMP port's
>	flags, VANILLAKEY events are sent for those keys which
>	have mappings and RAWKEY events are sent for all other
>	keys?
>
>For those of us who just want to grab the HELP and arrow keys as
>well as standard keyboard keys, this would be a great timesaver
>in programming (I'll bet that the number of programs that do
>incorrect key mapping will decrease, as well).

I was up against this problem a few months ago, and a number of people
from the net set me onto a good solution.  After you open your intuition
window, attach a CON: device to it.  Then do reads and writes (by
passing messages) to it.  The advantage here is that you are dealing
with only ANSI escape sequences, etc.  It really works well.
See Matt Dillon's dterm module for DNET for example code, or
send email to me and I will send you some of my stuff.  

With this method you can't detect key presses and releases, but
if you just want to deal with things ANSI style (arrow keys,
the help key, function keys, etc.) this is a very easy solution.

Nick