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 Sorry, just to clarify my previous post. By mapping the sequences to F30 (or whatever) I mean allocate them to a 'k' number in the termcap. eg if HOME is Esc[7~, and you wanted that to be F9, you could change the termcap to read; k9=\\E[7~ (cant remember my sytax, but it looks OK) A press of the HOME key might then be viewed by Informix as an F9. I'm sure you didn't need this clarification, but just in case...:) Bryan Tonnet