I'm a working with eclipse in Ubuntu. In eclipse, i frequently use a shortcut "Ctrl + Alt + Down Arrow" to duplicate the current line. I found that Ubuntu also has the same shortcut to switch the workspaces. So, my problem is when I press "Ctrl + Alt + Down Arrow", it calls the system's action. I tried this by disabling the keyboard shortcut in Ubuntu too. Still, it didn't work for me. Can anyone help me on this problem ?
7 Answers
1st solution: Remapping binding in eclipse
Have you tried remapping the binding in the preferences?
Window -> Preferences -> General -> Keys
Type "copy lines" in the filter.
Select the entry and edit the binding - I changed it to Ctrl+Alt+Numpad_4 and this seemed to work.
2nd solution: Disable keystroke in compiz
Note my actual fix for this is to disable a setting in compiz, but yo said this failed, here's what I did anyway in case it is useful:
System->Preferences-> ConpizConfigSettingsManager
Click "Advanced Search"
Type "down" in the filter box.
Click on "Desktop wall"
Disable "Move Down".
In my case I am running ubuntu 17.10 + Gnome, inside the keyboard shortcut configuration UI I was only seeing one binding
Move to workspace above : Super + Page Up
Move to workspace below : Super + Page Down
But in fact there was 2 shortcuts defined on those actions, as you can see with the following command
> gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-up
['<Super>Page_Up', '<Control><Alt>Up']
So I simply re-bound the shortcut inside the UI to Super + Page Up
, it erased the second binding
> gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-up
['<Super>Page_Up']
I am used to Ctrl + Alt + Down shortcut and CompizConfigSettingsManager method didn't work for me.
But I found solution in my Ubuntu Studio 14.04 (XFCE):
- Open Windows Manager:
xfwm4-settings
- Go to Keyboard tab
- Scroll down to
Lower worskpace
Action - Hit Clear button
Copy line shortcut works fine in Eclipse now.
In my case with Ubuntu 18.04 changing the setting in UI was not reflected in gsettings get... I achieved desired change with the same gsetting tool. First, check current setting:
$ gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-down
['<Super>Page_Down', '<Control><Alt>Down']
Then set new setting (note that setting needs to be quoted):
$ gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "['<Super>Page_Down']"
Then check new setting:
$ gsettings get org.gnome.desktop.wm.keybindings switch-to-workspace-down
['<Super>Page_Down']
In Ubuntu 18.04 do the following:
- Enter the Settings -> Devices -> Keyboard.
- In 'Navigation' menu click on the 'Move to workspace below' definition.
- Click on 'Backspace' to delete ALL current shortcuts, and then click on 'Set' above.
- Click again on the 'Move to workspace below' and press your desired shortcut (i.e. Super + Page Down) and then 'Set' above.
Now 'Ctrl Alt Down' is available, enjoy!