Intercepting Delete key event in editor

I’m putting together an editor extension and I need to call some code when the delete key is pressed. Unfortunately, the Unity editor is catching that event before it reaches my code. Here is what I have so far:

[CustomEditor(typeof(MyObject))]
public class MyObjectEditor : Editor {
    public void OnSceneGUI() {
            if (Event.current != null && 
                    Event.current.isKey && 
                    Event.current.type.Equals(EventType.keyDown) && 
                    Event.current.keyCode == KeyCode.Delete) {
                
                 //Delete code here
            }
    }
}

Anyone know any tricks?

Have you tried either of the following?

GUIUtility.hotControl = 0;
Event.current.Use();

The idea is that GUIUtility.hotControl removes the focus from whatever is selected, and Event.current.Use() “eats” the event so that it doesn’t make it to the sceneview.