12

I would like to disable the Ctrl+Shift+W shortcut which closes the current terminal tab.

I am using Vim where Ctrl+R Ctrl+W moves between windows of the vim instance. Sometimes it may happen that the Shift key is pressed unintentionally while trying to move to the next window. However, this immediately closes the current terminal tab with the editor session.

Can I disable Ctrl+Shift+W in the terminal and leaving other shortcuts untouched?

1 Answer 1

11

This part from the XFCE FAQ:


  • If you are running the Xfce desktop environment, enable Editable menu accelerators in the User Interface Preferences dialog.
  • If you are running GNOME then you can enable Editable menu accelerators in the Menu and Toolbars control center dialog.
  • Otherwise put the following in your ~/.gtkrc-2.0 file (create the file if it doesn't exist):

    gtk-can-change-accels=1
    

When xfsettingsd is running you must change the setting with the Xfce GUI, not through the ~/.gtkrc-2.0 file.


Once that is done:

  • Open xfce4-terminal
  • Open a new tab (Ctrl+Shift+T) so you have two tabs open
  • Move your mouse up to File and click to open the menu
  • Move your mouse down to Close Tab Ctrl+Shift+W and do NOT click the mouse
  • Press the Backspace key on your keyboard

Shortcut gone!


The User Interface Preferences plugin may not be installed and thus editing the file

~/.config/xfce4/terminal/accels.scm

may become necessary. Adding the line

(gtk_accel_path "<Actions>/terminal-window/close-tab" "")

will have disabled the shortcut after the next start of the terminal.

5
  • 5
    This doesn't work for me (running xfce4, xfsettingsd, xfce4-terminal-0.6.3), because I couldn't find the User Interface Preferences dialog to enable Editable menu accelerators, but manually editing ~/.config/xfce4/terminal/accels.scm did.
    – AlexG
    Commented Oct 8, 2014 at 7:32
  • 1
    I have added Community Wiki to my answer, please feel free to edit and add your solution as well.
    – suprjami
    Commented Oct 8, 2014 at 7:42
  • 2
    This does not seem to work in recent versions (xfce4-terminal 0.8.3) Is there a new way do do this?
    – bli
    Commented Feb 28, 2018 at 12:50
  • Can confirm this also didn't work for me, no effect whatsoever Commented Jul 26, 2021 at 11:59
  • @bli Maybe you made the same mistake as I did; I had to uncomment the line with gtk_accel_path, i.e. remove the semi-colon at the beginning of the line. Using the GUI didn't work for me Commented Jul 26, 2021 at 12:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .