Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!csd4.csd.uwm.edu!wls From: wls@csd4.csd.uwm.edu (Bill Stapleton) Newsgroups: comp.unix.wizards Subject: Re: Hints for using curses Message-ID: <1457@uwm.edu> Date: 12 Dec 89 22:37:34 GMT References: <532@mwtech.UUCP> Sender: news@uwm.edu Reply-To: wls@csd4.csd.uwm.edu.UUCP (Bill Stapleton) Organization: Computing Services, U of Wisc-Milwaukee Lines: 24 In article <532@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: >... some 'rules', for writing 'portable' application using curses: >3) Key codes: > IMHO, it's save to assume that the four "ARROW"-Keys and "HOME" > are present on any todays keyboard, as well as ten F-Keys. I think its best to stay away from function keys - There are only nine on this Zenith Z-49, and the first 4 have been reprogrammed to useful strings. You also have to account for key labelling - I guess I have ten F-keys, but one is labelled "HELP", not to be confused with PF1 - PF4 or F5 - F9. I used to have an old klunker at home that used ^Z in one of its arrow-key sequences, unusable with csh. In fact, if you want to be really safe, I think you're better off not assuming anything. There are still places with ancient terminals, and what with programmable keys and stuff, there's no telling what the user can actually input. I like the common practice of recognizing alternate key sequences, like arrow keys AND h-j-k-l, so people can use whatever works best. If I get a program that says type F1 to gorf, I'm stuck... -- Bill Stapleton wls@csd4.csd.uwm.edu uwmcsd4!wls