views:

23

answers:

1

Is there a way to account for all known OS/Browser combinations and have a single accesskey input for a link tag, without the modifier? As noted in Wikipedia (http://en.wikipedia.org/wiki/Access_key) I can have accesskey="d" and I know some users will input Alt+d some Alt+Shift+d. Is there a way around this? How can I allow a user to just enter "d"? Is this poor design or misplaced intent?

Thanks!

A: 

How can I allow a user to just enter "d"?

Attach an event listener on the document for all keypresses, doing particular things for the keys you want to pay attention to.

Is this poor design or misplaced intent?

Poor design, unless you want to go hoop jumping. Think of input fields.

Keep in mind that different platforms have different accesskey requirements because of how the platform works. For example, Alt+C on one platform might map to Ctrl+C on another, which might end up being "copy to clipboard" in addition to whatever else your page might want to do, and that could have unintended consequences.

Charles