Posts: 1,028
SamK
Joined: 21 Aug 2011
#1
In ROX-Filer, deleting a file or directory by default is done using a combined keystroke Ctrl+X. This is not particularly friendly as this key combination is conventionally used to cut text.

The suggestion is to assign the more widely expected Delete key to this instead, and ship antiX with this as its default.


Configure antiX
  1. Edit the hidden file /home/USERNAME/.gtkrc-2.0 to uncomment the line

    Code: Select all

    include"/home/USERNAME/.gtkrc-2.0.mine"
  2. Create a hidden text file /home/USERNAME/.gtkrc-2.0.mine and edit it to contain the line

    Code: Select all

    gtk-can-change-accels = 1
  3. Logout and login

Change the Key Assignment via ROX GUI
  1. In ROX-Filer right-click on a file
  2. In the pop-up menu hover the cursor over the Delete entry
  3. Tap the Delete key on the keyboard

To delete, highlight one or more files in ROX and tap the delete key on the keyboard.


Probably a good idea to retain the default to prompt for confirmation of deletion, but in case anyone wants to change that...
To prevent ROX asking for confirmation to delete
  1. Right-click on white space in a ROX-Filer window
  2. In the pop-up menu select Options
  3. In the Options menu select Action windows
  4. In the Action window tick Delete
  5. Click OK



Edit:
Added section Configure antiX
Aknowlegdement dolphin_oracle
Posts: 2,238
dolphin_oracle
Joined: 16 Dec 2007
#2
I am also in favor of having the delete key mapped to the delete function by default, if for no other reason than it brings Rox accelerator keys closer to the near-universal use of the keys by other filemanagers. I do offer the following comments to SamK's post in the case the it is decided that the delete key remapping should be made the default.

1. include ~/gtkrc-2.0.mine by default containing the"gtk-can-change-accels = 1 line".
2. however, leave the"include" line in ~/gtkrc-2.0 commented by default.

The reason to leave the include line commented by default is that with the line included and enabled, it is extremely easy to remap the accelerator keys in rox, to the point that it is actually possible to accidentally remap keys. In particular, I have accidently remapped delete to"copy" just this week.

It is tempting to simply include the"gtk-can-change-accels = 1" in ~/gtkrc-2.0 in a commented form, however, lxappearnce overwrites this file and the current recommended practice is to include customizations in gtkrc-2.0.mine. As far as I can tell in my testing, lxappearance will not overwrite the include statement that points to ~/gtkrc-2.0.mine.

The"gtk-can-change-accels = 1" is not needed to keep the delete key mapped to the delete function. Its only necessary to make the change. To that end, the key should be mapped out-of-the-box. We can include a section in the antix-faq to show how to enable the remapping function. Something like this:

Code: Select all

To enable accelerator key remapping in Rox, uncomment the line with the include statement in ~/gtkrc-2.0.mine.  You will need to reboot to enable the function.  Once your remapping is complete, we suggested re-commenting the include statement in ~/gtkrc-2.0.mine, as it is very easy to accidentally remap keys in Rox. 
The actual remapping of keys can be done via SamK's procedure above.

Thanks to SamK for focusing in on the usability issue. Its bugged me for a long time.