Wanted: how to read Sun console function keys

Greg Hawkes munnari!yabbie.co.rmit.oz.au!engsoft at uunet.uu.net
Fri Aug 4 13:49:11 AEST 1989


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



More information about the Comp.sys.sun mailing list