PDA

View Full Version : Delete key not triggered by Keymap



mabushadi
18 Jan 2007, 12:32 PM
Hello,

I can get the following to work perfectly on a grid to listen to key strokes, but not for the delete button. Does 127 ASCII code not represent the DELETE key? I would like to be able to used the keyboard to select rows from the grid and delete them through the keyboard.




var map = new YAHOO.ext.KeyMap(propsGrid, [
{
key: [13],
fn: function(key, e){ alert('Return was pressed'); } // fine
}, {
key: [127],
fn: function(key, e){ alert('DELETE was pressed'); } // no response
}, {
key: "\t",
ctrl:true,
shift:true,
fn: function(key, e){ alert('Control + shift + tab was pressed.'); // fine
}
}
]);



What am I missing. Your help is as always appreciated.

Thanks

helgean
3 Feb 2007, 1:53 PM
Try using keyCode=46 for the delete key