Macro commands: Check for duplicate accelerator

Tony Balinski ajbj at free.fr
Thu Oct 19 18:23:12 CEST 2006


Quoting "Thomas M. Schlageter" <thomas.schlageter at siemens.com>:

> On Thursday, 19. October 2006 09:36, Uwe Lehnert wrote:
> > Thomas M. Schlageter wrote:
> > >When customizing the Macro Menu [...]
> >
> > Some time ago i've tried to describe a feature request for a unified
> > key binding:
> > http://www.nedit.org/niki/index.php/UnifiedKeyBinding
> >
> > Maybe you want to add your thought to that page ...
> Done.
>
> 0,1 EUROcent from here ;-)
> --
> Thomas

Just thinking aloud here: what about a system whereby all menu accelerators
from resources are "hijacked", removed from the menu and added to the
translation table as a call to a set "accelerator_decode()" action routine,
with the actual key combination passed to this routine? This means that all
erstwhile menu accelerators would result in this routine being called, and
then this would call the action routine of the menu entry, without an Xm
accelerator in sight. Just another level of indirection. As the user defines
new accelerators for macro/shell menus, these would be added to the
translation table rather than used to create more accelerators. There would
be no real need to remove entries; the routine would simply ignore the key
combination. Sensitivity to language mode would be handled by the routine
too. And maybe all the silliness of control-characters going into the text
buffer rather than performing an accelerator action would go away too, along
with numlock and capslock problems. The built-in key event dictionary would
also allow the "is it already being used" check requested here.

I don't know how realistic this scheme would be. Is this rubbish? Doable?
Useful?

Tony


More information about the Discuss mailing list