Problem setting keyboard shortcut for Command in C# add-in
Answered
Hello!
I am currently developing a C# add-in for the 2021 version and I can't seem to be able to set or use a keyboard shortcut for my new command.
I follow the documentation exactly, but no luck
Even the sample macro code available in the docs does not seem to work... am I missing something simple? what does a "R" as the shortcut mean actually for the user?
Thank you :)
Hello Daniel
The context for this is setting a shortcut for a button or tab, and defining the caption for the button or tab. They are not shortcuts at the Windows level. When you press the Alt key in MindManager you can preview the shortcut keys for each tab in the ribbon. When you press a key for a tab, you can then see the shortcut keys for each button. If there is a button called "Report" in the tab, then the example code would have caused "R" to be previewed as the shortcut, and pressing R will raise the click event. If the parent tab had (for example) the shortcut key "Y" then pressing Alt,Y,R would run this command.
These shortcuts may be a single character or compound (multiple keys) provided that they are unique within the tab. This can only be done from an Add-in because if you create buttons or tabs in a macro, they go out of scope as soon as the macro stops running. For C# you will need to use (char)10 instead of vbLf.
Hello Daniel
The context for this is setting a shortcut for a button or tab, and defining the caption for the button or tab. They are not shortcuts at the Windows level. When you press the Alt key in MindManager you can preview the shortcut keys for each tab in the ribbon. When you press a key for a tab, you can then see the shortcut keys for each button. If there is a button called "Report" in the tab, then the example code would have caused "R" to be previewed as the shortcut, and pressing R will raise the click event. If the parent tab had (for example) the shortcut key "Y" then pressing Alt,Y,R would run this command.
These shortcuts may be a single character or compound (multiple keys) provided that they are unique within the tab. This can only be done from an Add-in because if you create buttons or tabs in a macro, they go out of scope as soon as the macro stops running. For C# you will need to use (char)10 instead of vbLf.
Hello Daniel
The context for this is setting a shortcut for a button or tab, and defining the caption for the button or tab. They are not shortcuts at the Windows level. When you press the Alt key in MindManager you can preview the shortcut keys for each tab in the ribbon. When you press a key for a tab, you can then see the shortcut keys for each button. If there is a button called "Report" in the tab, then the example code would have caused "R" to be previewed as the shortcut, and pressing R will raise the click event. If the parent tab had (for example) the shortcut key "Y" then pressing Alt,Y,R would run this command.
These shortcuts may be a single character or compound (multiple keys) provided that they are unique within the tab. This can only be done from an Add-in because if you create buttons or tabs in a macro, they go out of scope as soon as the macro stops running. For C# you will need to use (char)10 instead of vbLf.
Hello Daniel
The context for this is setting a shortcut for a button or tab, and defining the caption for the button or tab. They are not shortcuts at the Windows level. When you press the Alt key in MindManager you can preview the shortcut keys for each tab in the ribbon. When you press a key for a tab, you can then see the shortcut keys for each button. If there is a button called "Report" in the tab, then the example code would have caused "R" to be previewed as the shortcut, and pressing R will raise the click event. If the parent tab had (for example) the shortcut key "Y" then pressing Alt,Y,R would run this command.
These shortcuts may be a single character or compound (multiple keys) provided that they are unique within the tab. This can only be done from an Add-in because if you create buttons or tabs in a macro, they go out of scope as soon as the macro stops running. For C# you will need to use (char)10 instead of vbLf.
Thank you so much for explaining the meaning of "keyboard shortcuts" within MindManager (Alt key as a starter), it makes all the rest very clear and I can now see how all the builtin commands follow the alt, <Ribbon key>, <Command key> pattern. Pretty unintuitive on Windows (would've loved a classic Ctrl+<key> or something, pressing both at the same time rather than sequentially) but hey, at least there is something.
Not directly related, but would you know the link to the 2021 version Documentation? googling I could only find the 2020 API and then after a lot of sleuthing I found the 2022, but no luck for our current version.
Thanks so much!
Thank you so much for explaining the meaning of "keyboard shortcuts" within MindManager (Alt key as a starter), it makes all the rest very clear and I can now see how all the builtin commands follow the alt, <Ribbon key>, <Command key> pattern. Pretty unintuitive on Windows (would've loved a classic Ctrl+<key> or something, pressing both at the same time rather than sequentially) but hey, at least there is something.
Not directly related, but would you know the link to the 2021 version Documentation? googling I could only find the 2020 API and then after a lot of sleuthing I found the 2022, but no luck for our current version.
Thanks so much!
---