![Avatar](https://secure.gravatar.com/avatar/47679c6b743ebf29a597f33bd61fbb26.jpg?s=64&d=identicon&r=g)
CurrentlyToggleMinimization is defined as Ctrl-F1, how do I change it to something else?
Thanks.
CurrentlyToggleMinimization is defined as Ctrl-F1, how do I change it to something else?
Thanks.
Hello,
We attach to the containing Window's PreviewKeyDown event and watch for that key shortcut. If the Ribbon.IsMinimizable property is true, it will toggle the Ribbon.IsMinimized state. The reason we have that key shortcut hard-coded is that the official Microsoft specifications for ribbons require Ctrl+F1 to toggle minimization if minimization is used.
There isn't a way at the moment to alter that key sequence, nor should you since it is a common key shortcut that is used across all Microsoft ribbons (Office, Windows Explorer, etc.).
You could use Shift+F1 or Ctrl+Shift+F1 for your other needs instead.
I understand this is windows standard but our software must allow users to remap any key combinations to send different data to the host or perform different functions. Ctrl-F1 in our case by default will send certain data to the host. We will allow user to map it to other things they wish such as toggle the ribbon but it has to be configurable.
I think I will soon face the same issue. My users should also be able to remap shortcuts. Any chance keyboard shortcuts could be made customizable?
Ok we will update Ribbon logic for the next build (675 or later) so that you can do this sort of thing to set Ctrl+Shift+M for instance:
RibbonCommands.ToggleMinimization.InputGestures.Clear();
RibbonCommands.ToggleMinimization.InputGestures.Add(new KeyGesture(Key.M, ModifierKeys.Control | ModifierKeys.Shift));
Thank you. Since the latest maintenance release was just released, the next one may be a few months from now? Will you be able to provide a build for us now?
Just realized similar issue for the Ctrl-F6, Ctrl-Shift-F6, and Ctrl-F4. Need to be able to override those too.
[Modified 6 years ago]
Hi Rex,
How would you ideally like to be able to specify those particular keyboard shortcuts for Docking/MDI? There are related commands on DockSite for them but those commands are DelegateCommand instances, so they don't have an InputGestures property on them.
Probably just a way to turn them off If they can’t be changed.
Can the commands with the keyboard shortcuts also be executed by code? If so, disabling the built-in shortcuts and handing it off to the application to handle them would be the best approach I guess...
Those are just activating the next/previous document and closing the document so they can already be executed by code.
So all I need is a way to disable all hard coded keyboard shortcuts.
Hello,
For the next build, we have added a virtual DockSite.ProcessDockHostKeyDown method that is called when a key is pressed while focus is within a DockHost. It's a method we had internally before. You'll be able to override that and block the base method call if you detect one of those three key sequences you mentioned. You should still call it for all others though since it is responsible for handling Esc key presses and passing hotkeys to the Switcher as well.
And yes, you can programmatically call the DockSite.ActivateNextDocument, ActivatePreviousDocument, and ClosePrimaryDocument methods. Or you can execute their related commands.
If you'd like a preview build, please write our support address and mention this thread. We can send you a link from there.
Perfect! Thank you very much.
Please log in to a validated account to post comments.