3

Is there a way for me to change the Ctrl+Alt+Numpad 0 shortcut using the terminal?

I tried listing all gsettings and dconf shortcuts using the answer here, but didn't find the window placement ones except:

org.gnome.desktop.wm.keybindings toggle-maximized ['<Control><Alt>KP_5']

We use this shortcut in Blender, so I would like to change it or unassigned it in Ubuntu 16.04/Unity.

I need a terminal solution because I need to apply the change to a lab full of computers.

2 Answers2

3

I used gsettings list-recursively | grep minimize to find the gsettings key you're looking for: org.gnome.desktop.wm.keybindings minimize

If you wanted to disable it, you could use

gsettings set org.gnome.desktop.wm.keybindings minimize "['disabled']"
wjandrea
  • 14,504
0

You can use xbindkeys to reach your goal. I'd try it out on one of the lab computers, write a script to automate the necessary steps and run this script on every computer. Read man xbindkeys and the configuration example displayed by xbindkeys --defaults. Here's something to start with:

#!/bin/bash
sudo apt install xbindkeys xbindkeys-config # install packages
echo -e '# descriptive comment\n"command --to execute"\n   Control + Alt + Mod2 + KP_Insert' > ~/.xbindkeysrc # create ~/.xbindkeysrc
echo -e '[Desktop Entry]\nType=Application\nName=xbindkeys\nExec=xbindkeys\nX-GNOME-Autostart-enabled=true' > ~/.config/autostart/xbindkeys.desktop # autostart xbindkeys using a .desktop file

You can use xbindkeys -k to determine keycodes like Mod2 + KP_Insert for Numpad 0. Don't forget to add xbindkeys to your autostart commands, I added the command to create a .desktop file above which should be working. If it's not, try other solutions from here: How do I start applications automatically on login?

derHugo
  • 3,376
  • 5
  • 34
  • 52
dessert
  • 40,956