Re: Trapping home and end keys in 2.1
Posted in 1996
In <4tlegs$lvf@newsgate.dircon.co.uk> windata@dircon.co.uk (Terry Boyland) writes: >In article <31FE7F90.4269@west.co.za>, Mark D Stock <marks@west.co.za> says: >> >>Terry Boyland wrote: >>> >>> Here's a blast from the past >>> >>> I have a client with Informix 2.10.03F ( remember that ? ) >> >>Dot oh three, of course I do. >> >>> We need to trap the END and HOME keys in an input form in 4GL so that >>> pressing these keys will do nothing at all instead of faffing the screen >>> up. I would of thought that I can trap the termcap entry EN and kh and >>> remap them to nothing but this does not seem to work >> >>As far as I know, Informix only sees the function key definitions in termcap. Those are >>k0, k1,...etc. Make sure none of these are defined with the values returned by END and >>HOME. >> >>Define 'faffing the screen up' a little. Do they simply corrupt the screen or are they >>actually running a number of options. >> >>Two severe hacks you might try are to rip the guts out of a dummy termcap entry, >>including the function key definitions and see if the problem goes away. Or add 'ON KEY' >>clauses for all function keys in your termcap and see if any match when END and HOME are >>pressed. >> >Mark >Thank you for your comments but I think you missed the point a little >Neither of these keys are function keys and in fact have their own termcap >entries which I have shown in my mail as : EN for end and kh for home. >EN is not defined but still returns a ~ and move some of the screen display to >the top of the screen. kh is defined and although within the C program which >is remapping these keys I have mapped it to various other things including >nothing it still returns the same as EN Hmmm, do you know what escape sequences are actually output by the END and HOME keys? If not (and UNIX), you could get them by od -c <type END or HOME a few times> Control-D Once you know the sequences, could you map these to *harmless* function keys such as F30 and F31 (does 2.1 see function keys this high?)? If all that is doable, the END nd HOME keys should work like any other F-key on the pad, and be safely tucked out of the way. I haven't tried this, but it sounds like it might be worth a shot. Bryan Tonnet