Well, I would reccomend just commenting the key code out as per above instead of deleting so you can easilly undo it.
Also, don't delete/comment out the section header or name property.
Fine:
Code:
[Cmd311]
Name=Close_sel_torpedo_tube
;Key0=0x57,,"W"
;Ctxt=1
Bad:
Code:
;[Cmd311]
;Name=Close_sel_torpedo_tube
;Key0=0x57,,"W"
;Ctxt=1
And make a backup of the file before you go editing.