There are different methods with their own pros and cons.
Nautilus scripts
Instructions:
tee ~/.config/nautilus/scripts-accels << "EOF" > /dev/null
<Control>BackSpace trash
EOF
tee ~/.local/share/nautilus/scripts/trash << "EOF" > /dev/null
#!/usr/bin/bash
if [ -n "${NAUTILUS_SCRIPT_SELECTED_URIS}" ]
then while read -r SELECTED_URI
do gio trash -f "${SELECTED_URI}"
done <<< "${NAUTILUS_SCRIPT_SELECTED_URIS/%$'\n'/}"
fi
EOF
chmod +x ~/.local/share/nautilus/scripts/trash
nautilus -q
Notes:
- The mapping will only work for Nautilus.
- The built-in Undo action is not possible for this operation.
- The Trash action will fail if the filesystem doesn’t support it.
References:
Custom shortcuts and ydotool
Instructions:
sh -c "sleep .2; ydotool key 111:1 111:0"
Notes:
- The mapping will work globally for all apps in the GNOME session.
- The original function for Ctrl+Backspace will be replaced by the new one.
- The selection must not be changed within the specified time interval, otherwise the shortcut applies to the latest selection.
- The Ctrl modifier must be released within the specified time interval, otherwise it triggers the Ctrl+Delete shortcut that has a different function.
References: