As a follow-up to this very useful info, on a Windows PC, the file is located in:
The way the edited line is displayed in the above answer is correct but it may not be immediately obvious to everyone that like some other languages, the semicolon needs to be removed as well.
The semicolon is a comment tag that disables the line it is on.
<Primary> is the same as "Command" on macs and "Ctrl" on Windows.
Other modifiers are
<Alt> and they can be combined so to make it a bit more difficult to do accidentally, my new line is:
(gtk_accel_path "<Actions>/GncPluginPageRegisterActions/DeleteTransactionAction" "<Primary><Shift>Delete")
AKA: Control + Shift + Delete
I presume it was the same in earlier versions but I am new to GNUcash so it's also useful to note that, at least as of GNUcash 3.5, this keyboard shortcut triggers the Yes/No dialog to confirm that the transaction should be deleted. Additionally, you can select to ignore the dialog for the rest of the session or never show the dialog.