RemoveKeyboardShortcut(#PB_Shortcut_Revert)
Posted: Tue Jan 06, 2015 12:34 am
As discussed and suggested in my topic RemoveKeyboardShortcut with #PB_Shortcut_All kills tab, could we have an option in RemoveKeyboardShortcut() to remove only those shortcuts added in the program by AddKeyboardShortcut()? The suggestion in that topic was a new constant: #PB_Shortcut_Revert.
The reason: I provide users with the ability to select their own shortcuts for many program functions, just as the PB IDE does under Preferences. If the user changes some shortcuts and then clicks OK to apply the changes, I want to remove all the existing shortcuts and then add the currently-specified shortcuts. Since RemoveKeyboardShortcut(#Window, #PB_Shortcut_All) also removes the defaults of #PB_Shortcut_Tab and #PB_Shortcut_Tab|#PB_Shortcut_Shift, I currently preserve the old program-specified shortcut settings and loop through those to remove them.
Since this issue could apply to anyone wanting to provide user-specified shortcuts, it would be much easier if we could have something similar to #PB_Shortcut_All but which only removes our own shortcuts.
The reason: I provide users with the ability to select their own shortcuts for many program functions, just as the PB IDE does under Preferences. If the user changes some shortcuts and then clicks OK to apply the changes, I want to remove all the existing shortcuts and then add the currently-specified shortcuts. Since RemoveKeyboardShortcut(#Window, #PB_Shortcut_All) also removes the defaults of #PB_Shortcut_Tab and #PB_Shortcut_Tab|#PB_Shortcut_Shift, I currently preserve the old program-specified shortcut settings and loop through those to remove them.
Since this issue could apply to anyone wanting to provide user-specified shortcuts, it would be much easier if we could have something similar to #PB_Shortcut_All but which only removes our own shortcuts.