6

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?

8

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.

  • 3
    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 Oct 8 '14 at 7:32
  • 1
    I have added Community Wiki to my answer, please feel free to edit and add your solution as well. – suprjami Oct 8 '14 at 7:42
  • 1
    This does not seem to work in recent versions (xfce4-terminal 0.8.3) Is there a new way do do this? – bli Feb 28 '18 at 12:50

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.