I have the following code snippet:
do you mean you want to focus the divs whenever it is generated? try reasearching for these
http://api.jquery.com/focus/
and
http://api.jquery.com/live/
and for the keypress..
http://api.jquery.com/keypress/
afaik divs and other elements can have focus of some sort like in wikis, like..
http://en.wikipedia.org/wiki/JavaScript#Cross-site_vulnerabilities
and it'll scroll automatically there. I am just no sure how.
as for the dynamically generated divs and tables you can use jquery's live() function