Ascii Equivalents for KeyUp/KeyDown events

Richard A. O'Keefe ok at atlas.otago.ac.nz
Mon Dec 11 23:18:16 UTC 2000


"Lex Spoon" <lex at cc.gatech.edu> asked:
	Does Unicode include things like:
	
NO		F1
YES(%)		Up-Arrow
NO		Home
NO		Menu
NO		Alt
NO		Left_Alt
NO		AltGr
NO		CapsLock
NO		KeyPad0
^^^_ my answers.
	
(%) U+2191 UPWARDS ARROW is an up-arrow *character*,
so the answer is really "no" to all of them.

For a not very surprising reason.  The relevant standard for terminal
controls is a different standard entirely (you can pick it up free from
the ECMA site), and some of these things are standardly mapped to ESC
sequences, not single codes. (IIRC, F1 is "ESC [ 1 5 ~".)

I'd be rather happier if Squeakers *didn't* rely on keys I don't have
(like Menu, AltGr, or two different Alt keys).

	If so, then sure, let's use Unicode.
	If not, then, the existing X codes seem pretty reasonable.
	
The X keycodes are the nearest thing to a standard for single-number
codes for keys; as noted, the official standards for things other than
printing characters are mostly ESC sequences, and of course Microsoft
slapped a chunk of admittedly useful characters down on top of the C1
controls, making more than half of the standard codes that *do* exist
unusable.





More information about the Squeak-dev mailing list