I have a minitoolbar implemented using the ActiPro Ribbon MiniToolBarService. Some of the buttons on the minitoolbar should expose a slightly altered behavior when the Ctrl-Key is held while clicking the button (analoguously to ctrl+clicking a link in a browser to open it in a new tab instead of in-place). The minitoolbar is displayed in a document window regardless if another tool window currently has the focus, because we want to avoid having the user setting the focus to the desired view explicitly before interacting with it.
However, the ctrl+click behavior currently only works if the focus is in the component which hosts the minitoolbar. If the focus is currently in some other view, pressing the Ctrl key already hides the minitoolbar. In blueprint code I see that the reason is that the minitoolbar is hidden unconditionally if any key is pressed but IsKeyboardFocusWithin is false.
First question: wouldn't it be more correct to not hide the minitoolbar automatically when only a modifier key is pressed?
Second question: if it has to be that way - how can I work around this and achieve the decribed desired behavior?
I already tried setting/resetting the keyboard focus explicitly to the minitoolbar on MouseEnter/MouseLeave, but then there are other undesirable side effects. Keyboard navigation through the minitoolbar buttons is not desirable as the minitoolbar itself cannot be display through keyboard, plus the keyboard focus highlight on the button cannot be removed anymore and shows up on the next call to MiniToolBarService.Show. Setting all buttons to focusable=false etc. works to some extent but then calling MiniToolBarService.Hide from the Click handler doesn't seem to have any effect anymore. So this seems a dead end.
[Modified 3 years ago]