Is there any way to get 'accesskey' to work with document.location.href?

I'm using a set of functions as link generators and this is what I'm "stuck with" using.