I have a grid in a Dialog. I want to respond to the delete key being pressed so that I can delete records when the user presses the delete key.

adding a key listener to the dialog w/ a key of 127 seems to have no effect. I do have a Default button set and also have another key listener of 27 (escape) which works just fine.

Code:
dialog.addKeyListener(127, function() {alert('delete key pressed.')}, this, true);
Any ideas?