Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Contributor
bbElvin
Posts: 2
Registered: 02-08-2012
My Carrier: NA

capture del key event

Is there any way to capture the delete key on the keyboard?  I tried the following:


$("#textbox1").live('keydown', bind(this, onTextChanged));

$("#textbox2").live('keyup', bind(this, onTextChanged));

$("#textbox3").live('keypress', bind(this, onTextChanged));


onTextChanged = function(event){
alert ("bind keycode" + event.keyCode);
}


or


$('#textbox1').keydown(function(event){ 
alert("keydown keycode: "+event.keyCode); 
});

$('#textbox2').keyup(function(event){ 
alert("keyup keycode: "+event.keyCode); 
});

$('#textbox3').keypress(function(event){ 
alert("keypress keycode: "+event.keyCode); 
}); 


I tested on the bb bold 9900.  They works fine for the normal key, except for the del(backspace) key.  Is there a special event handler for the del key?  or I am doing something wrong?

 

Thanks in advance.

 

Please use plain text.