Anyway to test only for keys that would clear out a text field(backspace, delete) or other such actions.

Anyway to test only for keys that would clear out a text field(backspace, delete) or other such actions.

Hello,

I want to exclude regular alphabet characters. 

I have a function that Im trying to use:

$("#TO").on("keydown", ".TO", function(){ 
 var $this = $(this).val();               
 if ($this == "") {                       
 $(this).empty().remove();                
 }                                        
});                       

Is there a way to say keydown.not(keypress). In other words I want to only remove the element if they do backspace or other such actions to clear out a textfield.