Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Compiz and Gnome have many keyboard shortcuts. Examples are Ctrl+Alt+L for locking the session or Ctrl+Alt+Arrows for switching workspaces. Often they overwrite shortcuts in applications. It would be nice to have a way to temporarily disable these system shortcuts to make way for application shortcuts. Best thing would be to have a shortcut for doing so. :)

Any solutions, ideas?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

Here is an example of how to disable and enable individual shortcut-keys in Compiz:

Assign these two commands to hotkeys, or just run them in the terminal (either asis, or in scripts).

You can setup your shortcut-keys via "Keyboard Shortcuts" in the Preferences Menu... (I use xbindkeys.. It has finer control over wihch keys you can use. eg Numlock on/off makes a difference.)

Turn enable the shortcut-key for: Zoom Specific Level 1:

gconftool-2 --set /apps/compiz/plugins/ezoom/allscreens/options/zoom_specific_1_key --type string "<Shift><Control>Return"  

Turn disable the shortcut-key for: Zoom Specific Level 1:

gconftool-2 --set /apps/compiz/plugins/ezoom/allscreens/options/zoom_specific_1_key --type string "Disabled"  

If there are many hotkeys, just make two scripts: one for on, and the other for off

You can find all the Compiz keys in Gconf Editor: `gconf-editorenter code here

share|improve this answer
    
This looks like a very promising solution. I will try this. Maybe you know a (semi) automatic way to extract the current settings into the script? Or at least a file where I can read them without having to browse through the compiz setting manager. –  ziggystar Dec 15 '10 at 13:41
    
Actually it works and solves all my problems in a very customizable way. Thank you! –  ziggystar Dec 15 '10 at 14:12
    
@ziggystar... You're welcome... To list all keys and values: gconftool-2 --recursive-list /apps/compiz ... to get more info: info gconftool-2 –  Peter.O Dec 15 '10 at 14:53
add comment

To disable compiz temporarily, replace it with metacity, that's the other window manager/decorator.

Alt+F2, and run metacity --replace

To restore compiz, run compiz --replace

Of course, after logging off and in, or rebooting your computer, compiz will be used as the window manager (since this command disables it temporarily).

I use it quite often, so I've even bound it to a launcher in the gnome panel.

share|improve this answer
    
For anyone runnint those commands in the terminal, you should follow the command by an & ...see [askubuntu.com/questions/12682/…) –  Peter.O Dec 14 '10 at 17:20
    
This is a rather bold way of disabling the compiz shortcuts. Still, some (like ctrl+alt+arrows) remain active. Still, the switch is quick and it doesn't need any prerequisites. –  ziggystar Dec 15 '10 at 13:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.