0

I am using gnome-terminal version 3.20.2 with Ubuntu 16.10. I would like to determine the current keybindings in Gnome Terminal for switching to next tab using gsettings. This is similar to what is done in this answer for the Unity desktop.

From the menu in gnome-terminal I can change the key binding by selecting Terminal->Preferences->Shortcuts and then scrolling down to the Tabs heading and then clicking "Switch to Next Terminal". From this menu I can also see that my current binding is Ctrl+Right. How can I determine this binding from the command line using the gsettings command?

Edit:

I tried:

$ gsettings get org.gnome.Terminal.Legacy.Keybindings:/ next-tab
'<Control>Page_Down'

but this gives the default binding Ctrl+PageDown; I would like to get the current binding, which is Ctrl+Right.

1

I found a solution based on this answer. It seems like a full path must be given:

$ gsettings get org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab
'<Primary>Right'

I am not sure how to determine the full path for a relocatable schema (I simply copied the code from the above linked answer and it worked), if anyone can explain this better please feel free to edit this question or provide your own answer. It would also be interesting to know why not specifying a full path will give you the default value for the keybinding.

Also note that <Primary> refers to the Ctrl key, see this question for more information.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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