Cinnamon Custom Keyboard Shortcuts Fix

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
mattst
Level 1
Level 1
Posts: 28
Joined: Fri Oct 18, 2013 5:10 am

Cinnamon Custom Keyboard Shortcuts Fix

Post by mattst »

In: Linux Mint 17 Qiana, Cinnamon 64-bit 2.2.16
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.
The following instructions should fix these problems.

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
It can be started from the main menu or by entering `dconf-editor` in a terminal.

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']
If the list is in the 'wrong' order and/or with duplicate entries, e.g.

Code: Select all

['custom0', 'custom1', 'custom3', 'custom4', 'custom2', 'custom2']
Then that's probably the problem.

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']
...could be made into this (by moving `custom2`):

Code: Select all

['custom0', 'custom1', 'custom2', 'custom3', 'custom4']
then make the changes and, after restarting Cinnamon settings, adding new custom keyboard shortcuts should work without problems. [Note that the shortcut list ordering will have changed in keeping with the ordering that was changed in the `custom-list` key.]

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']
then restart Cinnamon settings and add a single new custom keyboard shortcut. Restart dconf-editor, and the missing value should now be at the end of the `custom-list` list and so an an ordered sequence can now be made.

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']
I hope this helps. :mrgreen:
Beerforfree

Re: Cinnamon Custom Keyboard Shortcuts Fix

Post by Beerforfree »

and what to do if my custom list is completely empty?
I've defined a couple of custom shortcuts which do not work, it seems they aren't stored any where after creation
mideal
Level 3
Level 3
Posts: 120
Joined: Fri Jan 18, 2013 10:28 am
Location: Germany - Wilhelmshaven & Frankfurt
Contact:

Re: Cinnamon Custom Keyboard Shortcuts Fix

Post by mideal »

Old thread, but still on top search results, so I have to add that since log the keybindings have been moved to

org.cinnamon.desktop.keybindings

in the configuration settings (which are suggested to check/change with dconf-editor above).
Yoga 910 16GB/2TB running Mint 20.3 Cinnamon 64Bit
__________________________
…trust me - I’m the sunscreen.
Post Reply

Return to “Tutorials”