This fix probably applies to other versions of Cinnamon as well.
Possible problems when adding custom keyboard shortcuts, to be specific:
System Settings --> Keyboard --> Keyboard Shortcuts --> Custom Shortcuts
- Can't add a new custom shortcut properly.
- After adding a new shortcut, adding a 2nd corrupts the one just added (e.g. both now have the same name).
- After adding a shortcut, one or more duplicates of it appear.
Before starting note that:
NOTE #1: During this fix Cinnamon settings and dconf-editor need to be completely restarted every time a change has been made in one or other of them for the changes to be refreshed.
NOTE #2: If using this fix make sure you keep a copy of the `custom-list` entries that you alter in a file, in case you make a mistake and need to put it back. It is easiest to make changes to the `custom-list` in a text editor anyway, just copy'n'paste the key's contents.
If necessary install dconf-editor, using:
Code: Select all
sudo apt-get install dconf-editor
Open dconf-editor and go to `org.cinnamon.keybindings` and examine the `custom-list` key.
Check the ordering and for any duplicates, it should be in numerical order, e.g.
Code: Select all
['custom0', 'custom1', 'custom2', 'custom3', 'custom4']
Code: Select all
['custom0', 'custom1', 'custom3', 'custom4', 'custom2', 'custom2']
Firstly in Cinnamon settings go to the custom keyboard shortcuts and delete the new shortcuts that were problematic. Make sure that there are no totally blank entries at the bottom of the list. If there are any then they can be selected by clicking on them and then deleted using the remove button. [A blank entry will be clear to see, an item at the bottom of the list but without any text.]
Restart dconf-editor and check the `custom-list` key again. If an ordered sequence can now be made, for example this:
Code: Select all
['custom0', 'custom1', 'custom3', 'custom4', 'custom2']
Code: Select all
['custom0', 'custom1', 'custom2', 'custom3', 'custom4']
If, however, the `custom-list` key can not be made into an ordered sequence because of a missing value, e.g. the following is missing `custom2`:
Code: Select all
['custom0', 'custom1', 'custom3', 'custom4']
The important thing to achieve is to get the `custom-list` key into numerical order with no duplicates, after which new custom keyboard shortcuts should work as normal. BUT you can not just add new values or remove duplicates in the `custom-list` key, you must only work with the values that are already present or it won't work, moving the position of an entry is the only legitimate action that can be performed. The removal of entries, duplicates, and empty entries or adding a new entry must only be done in the custom keyboard shortcuts dialog box of Cinnamon settings.
It is likely that the `custom-list` will be more complex than in the examples above. Mine looked like this before I did the fix.
Code: Select all
['custom0', 'custom1', 'custom2', 'custom3', 'custom4', 'custom5', 'custom6', 'custom7', 'custom8', 'custom9', 'custom10', 'custom11', 'custom12', 'custom13', 'custom14', 'custom15', 'custom16', 'custom17', 'custom18', 'custom19', 'custom20', 'custom22', 'custom23', 'custom24', 'custom25', 'custom21', 'custom21']