3

Is there any way to remove or configure the following Unity keyboard shortcuts?

I want to make use of these keyboard shortcuts, but I have no use for what they're currently assigned to.

  • Super+M (Music Search)
  • Super+A (Application Search)
  • Super+C (Picture Search)

The keyboard settings utility does not show these anywhere.

Jorge Castro
  • 71,754
namuol
  • 275

2 Answers2

3

You need to remove existing lense keyboard binding.

  • To do so, open a nautilus with with root by executing gksu nautilus

  • Navigate to /usr/share/unity/lenses, Now goto appropriate lenses directory .

  • Inside the folder, there will be a Shortcut field, remove or edit as you want.

    Source

To assign new command for these shortcut, you need to install compizconfig-settings-manager Install compizconfig-settings-manager and use Commands section at top.

More config info - How can I configure Unity?

Web-E
  • 21,418
  • 1
    Wow. Thanks! Is this documented anywhere? Were you part of the Unity development team by any chance?

    This works for me because I have a single-user system, but is there any way to configure this on a per-user basis? Perhaps some sort of user-space override of /usr/share/unity/lenses -- something in .config or similar?

    – namuol Jan 26 '13 at 08:37
  • These kinds of hidden stuff are just a mess. Why are they not available by the other keyboard bindings menus - as described in the OP?? – WestCoastProjects May 22 '15 at 08:53
1

For Ubuntu 16.04 the steps are different:

Open a terminal

Become root

sudo su -

The lenses are now apparently controlled by scopes

cd /usr/share/unity/scopes

The next command will show the files that contain a shortcut definition

grep -R "Short" *

Make a copy of the existing files (just in case) and verify they copied.

mkdir ~/scopes
cp -rp * ~/scopes
ls -Rl ~/scopes

Remove all the Shortcut entries - if you would rather just disabled some of the shortcuts, then edit the specific files that returned from the previous command.

find ./ -type f -exec sed '/Shortcut/,+1 d' {} \;

Verify all the shortcuts are removed

grep -R "Short" *

This takes effect immediately. The shortcuts do not disappear from Keyboard Shortcuts menu, however.