re repost accelerators translations in sdennis aa cad slb com sdennis osf org writes i posted this a while ago and didn t receive one reply and now we have another bug report on the same subject can anybody help me out the problem is that motif uses xgrabkey to implement menu accelerators and these grabs are specific about which modifiers apply unfortunately the specification for xgrabkey doesn t allow anymodifier to be combined with other modifiers which is exactly what would be desired in this case ctrl any key q in ora vol in the section on accelerators it says for information on how to specify translation tables see vol this is so you know what to put for the xmnaccelerator resource if you go to vol it says likewise if a modifier is specified there is nothing to prohibit other modifiers from being present as well for example the translation shift key q quit will take effect even if the ctrl key is held down at the same time as the shift key and the q key this is true for accelerators and mnemonics which are implemented using event handlers instead of grabs it s not true for menu accelerators if you re a motif implementor i d suggest lobbying to get the xlib semantics changed to support the feature i described above otherwise change the documentation for menu accelerators to properly set the user s expectations because menu accelerators are not the same thing as translations is it possible to supply accelerator for a menu entry if you mean menu accelerator no it s not possible that s according to the definition of the xmnaccelerator resource in the xmlabel manual page keep in mind when answering this question that when using motif you can t use xtinstallaccelerators i can t think of a reason why not how can you ensure that accelerators work the same independent of case what i want is ctrl o and ctrl o to both be accelerators on one menu entry there is a workaround for motif users in addition to the normal menu accelerator you install on the xmpushbutton gadget set an xtnaccelerators resource on the shell toplevel or application install the shell s accelerators on itself and all of its descendants with xtinstallallaccelerators shell shell for example applicationshell mainwindow menubar filecascade filepulldown openpushbutton exitpushbutton openpushbutton accelerator ctrl key o openpushbutton acceleratortext ctrl o exitpushbutton accelerator ctrl key q exitpushbutton acceleratortext ctrl q applicationshell accelerators override n ctrl key o performaction openpushbutton armandactivate n ctrl key q performaction exitpushbutton armandactivate you have to write and add the application action performaction which you can implement by using xtnametowidget on the first argument and then xtcallactionproc with the rest of the arguments i tested out something similar to this to shorten development time i used teleuse s tuninstallaccelerators resource to install the accelerators on the shell and i directly invoked the open and quit d actions instead of asking the pushbuttons to do it for me but the more general approach i described above should work trevor bourget trevor telesoft com
