I have an application which uses the microsoft webbrowser class ( IE activex ). I'm trying to bind the keydown event and add custom control to the arrow keys, but the keydown event is not fired when using the arrow keys.
I tried following code to capture the keydown event:
$(document).keydown(function(e){
alert("keydown"); });
$("#element").keydown(function(e){
alert("keydown"); });
document.onkeydown = function(evt) {
evt = evt || window.event;
var keyCode = evt.keyCodeq
if (keyCode >= 37 && keyCode <= 40) {
alert("ok");
return false;
}
};
The keydown event works, delete key by example, but not when using the arrow keys. When I use the arrow keys in the activex browser, the document scrolls, but it's not possible to add custom control.
In regular IE (non activex) everything works fine.
Any suggestions?