Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!ENG.SUN.COM!Mitch.Bradley From: Mitch.Bradley@ENG.SUN.COM Newsgroups: comp.lang.forth Subject: KEY and EKEY Message-ID: <9106020318.AA26997@ucbvax.Berkeley.EDU> Date: 30 May 91 02:00:13 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Mitch.Bradley%ENG.SUN.COM@SCFVM.GSFC.NASA.GOV Distribution: world Organization: The Internet Lines: 17 My current thinking is that EKEY could be eliminated, and KEY should be defined to return a *number*, not a character. There should be a constant (or perhaps an environment query) for MAX-CHARACTER . If the number returned by KEY is less than MAX-CHARACTER# , then it is a character in the implementation-defined character set. If the number is outside that range, it represents an event (function key, whatever) in an implementation-defined event space. The crucial point is that the set of valid characters is well-defined subset of the set of events, and it is possible for a program to test whether or not the thing returned by KEY is or is not a character. Presumably, a standard program would discard non-character events, or pass them to a system-specific event handler routine. What do you folks think about this? Mitch.Bradley@Eng.Sun.COM