engsoft@uunet.uu.net (Greg Hawkes) (08/04/89)
I'm writing an application to run under SunTools. I would like to detect the keyboard function keys, and particularly the arrow keys (I.e. the keys R8, R10, R12 and R14). The problem is that SunTools appears to capture the function key events, and 'interprets' these keys. Instead of sending a simple KEY_F(8) event, for example, my application gets an escape sequence (i.e. three ASCII events: 27, 91, xx). There is a justification for this, of course. The Sun console emulates an ANSI terminal, which does send this sequence for its function keys. But it's not what I want! I want to receive a single "function key" event. If anyone knows how to overcome this problem, I would appreciate a reply. Greg Hawkes Engsoft Computer Consultants Suite 2.8, 63 Stead Street South Melbourne VIC 3205 Ph. (03) 699-9411 FAX (03) 696-5969
chuck@trantor.harris-atd.com (Chuck Musciano) (08/22/89)
> The Sun console emulates an > ANSI terminal, which does send this sequence for its function keys. But > it's not what I want! I want to receive a single "function key" event. If you get a copy of tooltool 2.1 or higher, there is a module called func_fix.c which handles converting function keys from the ANSI sequences to single events. It was designed to be installed in most any application to transparently map function keys. You can get a copy via anonymous FTP from trantor.harris-atd.com (26.13.0.98) in /pub/suntools/tooltool, or from uunet.uu.net in comp.sources.sun, or (I think) from the Rice archive server. Chuck Musciano ARPA : chuck@trantor.harris-atd.com Harris Corporation Usenet: ...!uunet!x102a!trantor!chuck PO Box 37, MS 3A/1912 AT&T : (407) 727-6131 Melbourne, FL 32902 FAX : (407) 727-{5118,5227,4004} Gee, Beaver, everything's that fun can get you in trouble. Haven't you learned that yet? --Gilbert