Duplicate Addons Hotkeys
Open, NormalPublic

Description

System Information
OSX 10.9.5 AMD Radeon HD6770M

Blender Version
Broken: 2.7.5 cdf2dbe

Short description of error
Duplicated Addons Hotkeys

Exact steps for others to reproduce the error
1 Install any addon
2 Save (Export) custom hotkeys *.py file
3 Load (Import) custom hotkeys *.py file
4 In Hotkeys List - addon hotkey will be duplicated

Details

Type
Bug
Anton (AntohaRDNS) updated the task description. (Show Details)
Anton (AntohaRDNS) raised the priority of this task from to Needs Triage.
Anton (AntohaRDNS) added a project: BF Blender.
Anton (AntohaRDNS) set Type to Bug.
Sergey Sharybin (sergey) lowered the priority of this task from Normal to Incomplete.Sep 4 2015, 1:15 PM

Looked into the issue now, but i can not reproduce it. Was using Mesh.F2 addon as an example and after export/import there's only one keymap entry relevant to the addon.

@Anton (AntohaRDNS), please load factory settings and see if the issue still happens. If you manage to fail keymap again please provide full steps required for that.

Bastien Montagne (mont29) claimed this task.

@Sergey Sharybin (sergey) don’t really think export should ignore addons' shortcuts… It's probably more to see with how addons handle their shortcuts (un)registering - more than often badly (Even F2, which seems to not remove original 'F' shortcut before adding its own, sigh).

Anyway, no news since one week, closing for now.

Alan North (alannorth) reopened this task as Open.Dec 5 2017, 12:25 AM

I just ran into this bug while organizing my shortcuts. It's a bit weird to replicate but once you've replicated it it seems to keep doing it regardless of whether you do a reset (if you choose the same key config again).

Steps to Reproduce
Reset Blender, including the version folder in AppData to delete all key configs.
Enable an add-on that adds shortcuts (I used Mesh: F2)
It should now appear under Add-ons > 3D View > Mesh.
Disable the shortcut.
Create a new preset (e.g. Test).
Restore the section. A duplicate enabled shortcut should appear.
Export the config as Test.
Import the config. Another duplicate entry will appear.
Repeated importing/exporting will keep adding duplicates even if the disabled shortcut was removed.

Just importing the same file again and again does not do this.

Also sometimes the duplicates seem to hide behind the restore, if that makes sense, but I haven't been able to replicate the exact circumstances.

I don't know if it's the fault of the add-ons but lots of add-ons shipped with Blender do this. I'm just starting to learn scripting but F2 from what I can see looks to be registering/unregistering as suggested in the Add-on tutorial in the manual. A few add-ons give you the option to not register hotkeys but most don't. I wish I could block them altogether or at least be prompted what to do when an existing shortcut is being overridden or reactivated. Is there even a way for add-ons to check if they're overwriting an existing shortcut because the manual tutorial seems to imply there isn't and writers should just be careful to pick an obscure enough hotkey which is likely to cause problems for users who don't stick to the default keymaps.

Bastien Montagne (mont29) raised the priority of this task from Incomplete to Normal.Thu, Jul 12, 11:29 AM
Bastien Montagne (mont29) removed Bastien Montagne (mont29) as the assignee of this task.