Accelerator keys in popup menus don't work
jan at rychter.com
Fri Aug 13 15:42:25 EDT 2004
>>>>> "Malcolm" == Malcolm Purvis <malcolmp at xemacs.org> writes:
>>>>> "Jan" == Jan Rychter <jan at rychter.com> writes:
Jan> Pop-up menus display accelerator keys, but they don't seem to
Jan> work. It seems that accelerator keys only work in the main menu.
Malcolm> Thanks for the bug report.
Malcolm> After looking at the code I don't think that this will be easy
Malcolm> to fix. The accelerator handling code for X is byzantine and
Malcolm> may need significant reorganisation before it can support
Malcolm> popup menus. On the other hand, the code that sets up the
Malcolm> underline doesn't know the difference between popup and
Malcolm> drop-down menus so that can't be easily changed either.
Malcolm> I've noted it down as something to look at later, but it could
Malcolm> take a while to resolve.
Hmm. Perhaps I shouldn't use pop-up menus at all...
I have a related question, then: is there way to "pull down" a pop-up
menu from Lisp?
I need this for speech recognition corrections: if you click the right
mouse button on a word or on a region of text, a "corrections" menu
appears, showing the alternatives to what has been recognized. To choose
a correction, the user should be able to either:
-- click a mouse button
-- press a number key
-- say "choose <number>"
Now, I guess the second option is out, so how would I implement the
third one? Is it possible to find out if a pop-up menu is currently
visible, and tell it to choose a particular menu item? Or, as a
workaround, just hide the menu?
If pop-up menus are not up to this, I might have to use a separate frame
with a special electric buffer, sort of like what ediff does. But I
really don't like this approach: it's not elegant, it's difficult to
use, and it's much more difficult to manage correctly.
More information about the XEmacs-Beta