I haven't tried any other browser yet but in chrome, capturing the backspace key is not working out too well.

I have used the following to capture the keys,


Code:
window.onkeypress = function(){
try{
	var k= event.which || event.charCode || event.keyCode;	
	var key = String.fromCharCode(k);
...
the alternate code I have used is that seems to capture the keys but still the problem exists is
Code:
window.onkeydown = function(){
try{
	var k= event.which || event.charCode || event.keyCode;	
	var key = String.fromCharCode(k);
...
While using in a text area the back space and cursor keys are not a problem but capturing keys like back space is a problem when the textarea does not have focus.

I have tried to surpress the window redirection from the back space being hit when the textarea has no focus.. just not happening.

Any ideas?