How do you disable the CTRL+T ‘move to trash’ shortcut in GNOME/Nautilus?

10 July 2007, Answered! Thanks to und0 for explaining in the comments. See below…
I just discovered an inconvenient default behavior of the Nautilus file browser. (At least, it appears to be a default in Ubuntu 7.04/Feisty Fawn.) I thought I was in my Firefox window and pressed <CTRL> T to open a new tab, but the focus was in Nautilus and I deleted a file instead. I wasn’t quite sure what I did at first since my attention was on the Firefox window. I immediately checked for an “undo” command in the edit menu, but there doesn’t seem to be one for Nautilus. (Also quite unfortunate.)
Still not sure what had happened, and like a dummy, I pressed CTRL+T again and this time could clearly see a file disappear, although I hadn’t been looking closely at which one I had selected, so now I was missing two files. Only a little bit disturbing since I have backups laying around and these were files I hadn’t been working on so they would be in a recent backup. Plus I expected to find them in the trash. I looked there and saw what was probably one of the files, but then I discovered a shortcoming of the GNOME trash folder: it doesn’t show when files were deleted. (Or at least, I don’t know how to get to that useful piece of information.) So it wasn’t easy to tell all the files I had just discarded. (Because who knows, maybe I stabbed at CTRL+T one more time without realizing it.)
It was easy enough to fall back on yesterday’s backup to verify which files were missing, but this is not a good keyboard shortcut for me. It’s a key combination I use all the time in Firefox and so am likely to do this again, maybe not noticing when I delete a file next time. And it’s redundant with the “Delete” key, so is kind of pointless in my opinion. But I can’t find where it is configured in order to disable it. I tried System » Preferences » Keyboard Shortcuts, and poked around briefly in gconf-editor, and did several Google searches.
I would have tabled it for later, but decided instead to see if I could harness the power of the lazy web and let you knowledgeable readers tell me where this bad behavior is configured. :-) Any tips would be muchos appreciated.
(Gack! I just did it again while looking for a picture to include with this post!)
Answer
In Nautilus 2.18.1 or thereabout, go to System » Preferences » Menus & Toolbars. Select Editable menu shortcut keys and close the dialog box. Click on the Edit menu in the File Browser and highlight the Empty Trash item. See how it has Ctrl+T listed as the keyboard shortcut? With the the focus on that menu item, press the Delete key to get rid of the shortcut.


Update, 24 February 2008: Thanks to mekura for pointing out that in Nautilus 2.20, the “Editable” option has moved to System » Preferences » Appearance » Interface. The Interface tab is essentially the same as the Menu & Toolbar Preferences dialog, with the exception of the “Detachable toolbars” checkbox which has gone missing.
Alternatively, you could assign a different key combination, but it would be redundant with the more logical and intuitively obvious Delete key itself.
I recommend going back in to the Menu & Toolbar Preferences and re-disabling editable shortcut keys, since this feature is probably even more fraught with peril than the original situation. Take a look at the GNOME help:
Editable menu accelerators
Selecting this option allows you to define new keyboard shortcuts for menu items.
To change an application shortcut key, open the menu, and with the mouse pointer on the menu item you wish to change, press the new combination of keys. To remove a shortcut key, press Backspace or Delete.
When using this feature, you will not be warned if assigning a new shortcut key to a command also removes it from another command.
There is no way to restore the original, default keyboard shortcut for a comamnd. (Oops, someone file a typo report.)
This feature does not maintain shortcuts that are normally common to all applications, such as Ctrl+C for Copy. This may lead to inconsistencies in your GNOME applications.
So there you have it. Thanks again, und0.
Comments
-
From the menu, System -> Preferences -> Menus & Toolbars, activate “Editable menu shortcut keys”, now you can change the key bindings (shortcuts) simply selecting the menu entry and inserting a new key combination, or using the “Delete” key to remove the binding (shortcut).
Posted by und0 on 10 July 2007 at 12:58 am
-
Thanks! I’ve trashed many files by mistake because of this behavior. I’m safer now.
Posted by Maxime Piché on 18 August 2007 at 1:16 pm
-
In Nautilus 2.20, the “Editable menu shortcut keys” option is under ‘System’ >> ‘Preferences’ >> ‘Appearance’ >> ‘Interface’
Sorry for responding to such an old topic, hope this helps.
Posted by mekura on 24 February 2008 at 3:48 pm
You can follow any responses to this entry through the
comments feed.


bookmark with del.icio.us
Richard Stallman:


