Stimulating tab key

Stimulating tab key

I'm trying to write a code which stimulated the function of TAB key. This is the code I wrote so far.
$('#scrollPane').keydown(function(event){
    var key = event.charCode ? event.charCode : event.keyCode;
    if(key==9){
event.target.focus();
    return false;
    }
 
});


What I need to do was obtaining the next target which will be focused, and focusing it manually. But when using event.target it contains the currently focused element. So my code just focuses to the same place without moving to the next element. Can anybody help me out of here