salevin%drlc1@CONVEX.COM (S. A. Levin[Stewart]) (03/10/90)
/****/ I have had problems with R3 (and apparently R4) keyboard accelerators not doing what I anticipated they should. What I want is the ability to type a pair of keystrokes to bypass a menu popup and go straight to an action, e.g. "SH" to show an image and "ST" to stop processing, and to be able to pop up a prompt menu if only the first of the keystrokes is type, e.g. "S" would pop up a prompting menu listing "H" and "T" as items to select. This is the behavior I am accustomed to expect from other windowing systems I've used. In the X-Toolkit Intrinsics manual, p. 124 of the R3 version, there is a brief mention about double-clicks which reads For double click on Button 1 Down with Shift, use this sepcification: Shift<Btn1Down>(2): the() This is equivalent to the following line WITH APPROPRIATE TIMERS SET BETWEEN EVENTS: Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down>: the() I took this to indicate that the recognition of multievent sequences has built in timers to distinguish between it and various initial subsequences (e.g. one double click vs two single clicks), so I built my application around the accelerator mechanism. For the SH/ST example this says to use ":<Key>S,:<Key>H:show()\n:<Key>S,:<Key>T:stop()\n:<Key>S:prompt()\n" as the appropriate accelerator translation table. This doesn't work, and, according to converse@expo, accelerators are not currently designed to work this way. So what I need is 1) A workaround, hopefully short of munging at the Xlib level, and 2) A discussion of whether accelerators ought to work "my" way, i.e. with appropriate timers to distinguish grouped events from isolated events that happen to occur in sequence. --- stew@hanauma.stanford.edu