Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.soft-sys.andrew Subject: Re: X11 key bindings, once again... Message-ID: <4906@auspex.auspex.com> Date: 19 Dec 90 18:56:33 GMT References: Organization: Auspex Systems, Santa Clara Lines: 38 >Or maybe set the high bit? Let's see, the "key" parameter to procedures such as "userKey" is a "long"; setting the high bit - namely, 0x80000000 - seems ok.... Now, if by "the high bit" you meant the high bit of a "char", thanks but no thanks; setting the high bit on a lower-case "b", for instance, gives you "a with circumflex accent", which is probably not what you want.... I'd vote for having a keystroke event's code having, say, a character in the lower 8 (or maybe 16) bits, and a bunch of modifier flags (Meta and Alt, at least; probably Shift and Ctrl and others as well, at least for keys where Shift and Ctrl would otherwise have no effect) in the upper bits. The interaction manager for window systems such as WM with limited notions of "what to do with modifier bits" would never set those bits, but the interaction manager for window systems that handle modifier bits better, e.g. X11 and Presentation Manager, could set them. Those window systems could still, by default, ignore the Alt key, treat the Meta key as a request to generate a -key event before the regular key event, and never add in Shift or Ctrl as modifier flags. The key binding syntax could be extended to let you bind, say, Meta+Shift+Delete to an inset's "cut" function (to pick a purely hypothetical example :-) :-) :-)). It could also let you specify arbitrary keysym names in X, to let you bind to keys that Andrew doesn't have built-in knowledge of; a similar set of names could be constructed for, say, Presentation Manager. With the defaults listed above, you could still pretend that other window systems have a keyboard input model like WM's, and the default key bindings would be unchanged, but if you have a window system with a more capable keyboard input model, you could set things up to use it. (This would also involve having the X interaction manager, for example, shut off any calls in the set of "XRebindKeysym()" calls if the keysym in question was directly bound to a procedure.)