DO11: Conflict between accelerator keys and hotkeys

I have just one problem from my earlier posting that I can't either solve or workaround, and I hope it's OK to repost it. I am encountering a problem whereby the second keystroke in a "ToolbarMenu - - > Button" sequence is being interpreted as a hotkey rather than as an accelerator key. To repeat the details of the example i gave earlier:

  • On my main non-floating toolbar, the Help menu is titled "&Help", so it is expanded by "Alt+H" in both DOpus10 and DOpus11.
  • The Help menu has a button titled "&R. Resource Centre", which brings up the DOpus resource centre.
    — In DOpus10, "Alt+H - - > R" brings up this resource centre, as expected. Thus "R" is being interpreted as an accelerator key.
    — In DOpus11, "Alt+H - - > R" toggles the tree in the right-hand panel. This is because I have elsewhere set the non-global hotkey "R" for this purpose. Thus the keypress "R" is now being interpreted as a hotkey, not as an accelerator key.

Is this change of precedence a deliberate change in DOpus 11, or is it a bug? I have been using all 26 letters of the alphabet as non-global hotkeys for a long time now, so the situation is rather a problem for me.

I believe that it is a bug, because the accelerator keys behave as normal in my two floating toolbars. For example:

  • Alt+X - - > W - - > X" brings up a floating toolbar, then expands a menu of Windows programmes, then launches Excel.
    Also, I can now float my main toolbar above using "RightClick - - > Float". Then, when I click on "Help" and press "R", I get the DOpus resource centre, which means that the "R" is now being intepreted as an accelerator key, not as a hotkey.

As far as I can tell, Opus 10.5.4.0 behaved in exactly the same way as Opus 11 in this regard:

The difference with floating toolbars is also neither a surprise nor a bug, since when a floating toolbar is the active window, any hotkeys which are bound to listers are no longer in scope.

Thank you very much, Leo, for such detail, and for preparing the video. It's becoming clear that the bug is me in front of the monitor, and that there is setting in Preferences that I have set differently.

In your video, there is no command in the "Help" menu beginning with "&R", as there was in my example, where there was a button labelled "&R. Resource Centre". I still have DOpus10 on my laptop, so I experimented with it.

  • I deleted the & so that the button is now "R. Resource Centre", without accelerator key. The sequence "Alt+H - - > R" now brings up the menu "Run" on my main non-floating toolbar, because its title is "&Run".
  • I then deleted the ampersand here as well, so that the menu title is just "Run". Now the sequence "Alt+H - - > R" expands the "Help" menu on the "Alt+H" keypress, but the subsequent "R" keypress does nothing, even though I have set the hotkey "R" to toggle the right tree. I have to press "Esc - - > R" to make the hotkey work.

This is different from your example, where "Alt+H - - > R" expanded the "Help" menu and the activated the unrelated hotkey. I've searched and searched for some relevant setting in Preferences, but I can't find anything.

[Sorry for the the butterfingers — I posted by mistake before I had finished.]

In my desperation, I uninstalled DOpus 11 from my PC, reinstalled DOpus 10, and then reinstalled DOpus11. So it now has completely "factory setting", not just factory toolbars. I added a single button called "Sort on Modified" to the "Tools" menu as an experiment, and assigned it the hotkey M (but it has no accelerator key). Note that the "Tools" is titled "&Tools", and it already has a button "&Map Network Drive". I have uploaded two screen shots to show what I have done.



In this state:

  • "Alt+T - - > M" expands the "Tools" menu, and then sorts on modified.

Then I deleted the hotkey "M" that I had given to "Sort on Modified".

  • "Alt+T - - > M" now expands the "Tools" menu, and then brings up the "Map Network Drive" menu.

So again, hotkeys are taking precedence over accelerator keys, but as I said before, I reckon I'm missing something in the settings.

It wasn't in the video but I also tried with Alt-H, A (which opens the About dialog; unless a hotkey is assigned to A, in which case it runs the hotkey instead), so the lack of an &R item in the default menu doesn't change anything in the end.

I think that's just how it works and how it has worked for a while (if not always).

(I also don't think it's a good idea to bind hotkeys to letters on their own -- i.e. without one of Ctrl/Shift/Alt/etc. It's too easy to trigger accidentally, and it breaks useful features like Find As You Type.)

DOpus 10 and DOpus 11 don't behave the same way. I have just found a most surprising distinction in DOpus 10, depending on whether the hotkey is the result of editing a button on a non-floating toolbar, or is created as a new hotkey in "Customise - - > Keys".

IN DOPUS 10: Once again, I uninstalled DOpus 11 and reinstalled DOpus 10.5.4.0, leaving it in Factory Default. I then added the single button that I had before, as in my .jpg files above. In this situation:

  • "Alt+H - - > M" expands the Help menu, then brings up the "Map Network Drive" menu.
    That is, the accelerator key takes precedence over the hotkey.

Then I deleted the new button, and instead used "Customise - - > Keys" to add a non-global hotkey with precisely the same command "Set Sortby=Modified SortReverse=ToggleSmart". (That's the way the hotkey "R" was added in the video above.) In this situation:

  • "Alt+H - - > M" now expands the Help menu, then sorts files on date modified.
    That is, the hotkey takes precedence over the accelerator key!!!

IN DOPUS 11: I then deleted the new button and the new hotkey, and reinstalled DOpus 11 over the top of DOpus 10, again leaving everything in Factory Default. Whether or not the hotkey "M" is added through a new button on the toolbar, or by a new hotkey on "Customise - - > Keys":

  • "Alt+H - - > M" expands the Help menu, then sorts the files on date modified.
    That is, the hotkey takes precedence over the accelerator key in both situations.

All my single-letter hotkeys in DOpus 10 were added through buttons on a menu on a non-floating toolbar, so I have never run into the problem of single-letter hotkeys added through "Customise - - > Keys". I use the minus sign to initiate FAYT, so I have never had any problem there. For a long time now, I have found these single-letter hotkeys amazingly useful and efficient, and I use them all the time, for purposes such as toggling the viewer, toggling dual pane, troggling sort order, toggling trees, toggling status bar, and so forth. For me, they make everything so easy.


Before I set out and reconfigure all my 26 single-letter hotkeys (and I have also used all 26 Ctrl+ hotkeys, plus many more Ctrl+Shift+ and Alt+Shift+ combinations, so that would not be a straightforward process at all), could I make a strong plea, that either DOpus11 behaves the same way as DOpus 10, or else that DOpus 11 has some sort of switch that allows accelerator keys to take precedence over hotkeys in a toolbar-menu keypress sequence, non-floating as well as floating. I hope that such pleas are what Beta evaluation is all about. Such flexibility — allowing the user to configure the software as he wishes — is the most significant reason why I have been so keen on DOpus and have recommended it to so many other people.

I've tested that and you're right that Opus 10 treated toolbar hotkeys and standalone hotkeys differently w.r.t. overriding accelerators.

I think the inconsistency itself was wrong, but it's now resolved and things are consistent in Opus 11, albeit not the way around that you would want.

I'm not familiar with the relevant parts of the toolbar/hotkey code to know off the top of my head if it's a large or small change to make things work in the opposite way, but we may look into it and see. It seems arbitrary to me which way around it works, and a bad idea to have hotkeys that use letters on their own in the first place, but if it's easy to make it work the other way then I can't think of a reason why not (unless someone complains about that change from the Opus 10 behaviour, which is possible).

Thanks, Leo, for the confirmation. It's good to have sorted out what the situation is. Unfortunately, I'll have to go back to DOpus 10 for now, because as you can see, my configuration is completely unusable in the current situation (a pity, because I wanted to begin replacing my clumsy system of environment variables with the new DOpus variables). I'll offer fervent prayers to the kind Saint who gives presents to those whom Santa Klaus has forgotten on Christmas Day.

From what I read on the Forum, I seem to be using DOpus for a slightly different purpose that many others. I've configured it principally so that I have at my fingertips the quickest possible way to get to my programmes and my files using the keyboard only, because constant use of the mouse makes my hand sore. I reckon I have done this extremely effectively. I can send you my DOpus config file if it would help.

I can't imagine that anyone would ever expect the next keypress, after a menu is expanded, to invoke a single-letter hotkey rather that an accelerator key — such an expectation in a toolbarmenu+button sequence seems quite illogical — but the relevant switch could always be placed in a Preferences.

I have now sorted out a clumsy workaround that will allow me to keep the DOpus 11 Beta installed. I have used one of the new features of DOpus 11, and changed all 26 single-digit hotkeys to double-letter hotkeys whose first keypress is "Z" (for example, the hotkey "R" has become "Z, R"). I'll continue to invoke the saint — St Jude, I believe.

One thing puzzles me, however, and may indicate a glitch associated somehow with my problems as reported above. Some of the menus on my main toolbar use the accelerator key "&Z".

  • When I expand such a menu and press "Z", two things happen:
    — The button with accelerator key "&Z" is performed successfully.
    — The new tiny hotkey-sequence box on the bottom left appears, with "Z, ...?".
  • If I now press a second letter, say "R", within the 5 seconds timeout, the hotkey "Z, R" is performed. This behaviour seems unexpected, because the "Z" keypress has already done its job as an accelerator key. Why is the one keypress "Z" doing two things?

Hopefully all this is solved now with beta 3 making accelerators take priority.

All fixed, as far as I can tell. Thanks very much, Leo and Jon. I put a longer note on my other related posting, "DO11: Where is the hotkey 'Space' for 'Select'?"