Score:1

Change shortcut to switch tab in gnome-terminal

zm flag

I found similar questions but none addresses the problem:

In gnome-terminal, I would like to change my shortcut to change tabs:

  • Switch to Previous Tab: Ctrl+Shift+Tab
  • Switch to Next Tab: Ctrl+Tab

Just like in every browser. However, if I try to set these options, gnome-terminal just returns an error sounds and it doesn't work. It seems like the tab key is messing things up, because every assignment that does not involve the tab key works fine.

Does anyone have a solution?

Score:1
cn flag

Apparently, the Preferences dialog does not allow you to set these keybindings indeed. However, it will work if you directly change the setting using the terminal, as in:

gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ next-tab '<Control>Tab'
gsettings set org.gnome.Terminal.Legacy.Keybindings:/org/gnome/terminal/legacy/keybindings/ prev-tab '<Control><Shift>Tab'
ado sar avatar
jp flag
Why it does not allow it?
vanadium avatar
cn flag
@adosar Unfortunately I am not a developper, so I cannot tell you what conceptual or perhaps merely technical reasons would prohibit this from working in the Preferences dialog.
Tom avatar
au flag
Tom
Hi, I am using 22.04 but it doesn't work. I am hesitant to ask this by creating+posting another question in AskUbuntu. @vanadium if you have some insight in this problem, and if you could help me, it would be great.
ru flag
@Tom how does it not work? I just found this question and tried the above (on 22.04 LTS) and it works fine for me. Curiously, the gnome terminal settings UI says "Invalid" for the shortcuts in question, but they work as expected. *shrugs*
Score:1
il flag

@vanadium answer is correct.

You can also set it via UI in the Gnome Terminal Preferences:

enter image description here

vanadium avatar
cn flag
Note that setting Ctrl+Tab ans Ctrl+Shift+Tab does *not* work though the preferences dialog as I indicated in my answer (did you test?). You can set different keys, though. You may want to test and delete your answer if indeed it does not work for said keys.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.