wikimedia-gadgets / twinkle

The English Wikipedia twinkle javascript helper
http://en.wikipedia.org/wiki/Wikipedia:Twinkle
Other
135 stars 148 forks source link

Main button in any morebits window should be triggerable with an accesskey hotkey #1903

Open NovemLinguae opened 10 months ago

NovemLinguae commented 10 months ago

accesskey="[letterGoesHere]" tells the browser to use its normal hotkey combination to make that a hotkey. For example, in Chrome, accesskey="s" will make Alt+Shift+S and Alt+S the hotkey. The exact control keys vary based on browser.

image
siddharthvp commented 10 months ago

S as the hotkey makes sense.

As for the edge case, I don't think it's a concern as an HTML form only has one submit element (which Morebits implements as a button). Even if there are multiple buttons, only one would be the primary submit button.