State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|TargetRelease:3.0v6|BugID:369511|
Problem summary:
When assigning a keyboard shortcut in Katana. If a shortcut already exists, a new shortcut of the same key will not be assigned. The assignment should only fail if the key would be in conflict in the same context.
Steps to reproduce:
from UI4.App.KeyboardShortcutManager import KeyboardShortcutManagerclass DummyTestPanel(object): def actionCallback(self): print('Action Callback')KeyboardShortcutManager.RegisterAction('50d4d5c1d7704d44bf9f0f3b54c36969', 'Dummy Test Panel.Action1', 'Ctrl+L', DummyTestPanel.actionCallback)KeyboardShortcutManager.RegisterAction('4c9583cbc93f4de982dbd9cc1aa47fd1', 'Dummy Test Panel.Action2', 'Ctrl+L', DummyTestPanel.actionCallback)KeyboardShortcutManager.RegisterAction('53cbc93f4de982dbd9cc7dff12336969', 'Another Test Panel.Action', 'Ctrl+L', DummyTestPanel.actionCallback) Expected behaviour:
Now the 3rd action will be registered, as it has a different context. We still get the warning for the 2nd action:
[WARN python.KeyboardShortcutManager]: RegisterAction(): Unable to register action with ID "4c9583cbc93f4de982dbd9cc1aa47fd1" and name "Dummy Test Panel.Action2": Shortcut "Ctrl+L" has already been used for "Dummy Test Panel.Action1". Shortcut will not be assigned. Actual behaviour:
The 2nd and 3rd actions won't be registered, and a warning will be printed for both of them:
[WARN python.KeyboardShortcutManager]: RegisterAction(): Unable to register action with ID "4c9583cbc93f4de982dbd9cc1aa47fd1" and name "Dummy Test Panel.Action2": Shortcut "Ctrl+L" has already been used for "Dummy Test Panel.Action1". Shortcut will not be assigned.[WARN python.KeyboardShortcutManager]: RegisterAction(): Unable to register action with ID "53cbc93f4de982dbd9cc7dff12336969" and name "Another Test Panel.Action": Shortcut "Ctrl+L" has already been used for "Dummy Test Panel.Action1". Shortcut will not be assigned. Workaround:
No known workaround.
Tested versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why