css-only-chat
css-only-chat copied to clipboard
Use accesskey to reimplement the keyboard
You can use HTML attribute accesskey
to access the elements on the page. I've put together a small demo here: https://jsfiddle.net/x4ek56pc/
I've used jQuery in my example but that's just for the purpose of demonstration and it is not required for the accesskey
to work.
https://www.w3schools.com/tags/att_global_accesskey.asp
Very nice! Yeah, I'm pretty confident that accesskey
is the missing piece I'd need to make this a lot smoother. I'm not sure exactly when I'll come back to this - maybe on some upcoming train rides, but I'd love to rewrite it around that concept. :)
You can use HTML attribute
accesskey
to access the elements on the page. I've put together a small demo here: https://jsfiddle.net/x4ek56pc/
I've just tested your fiddle on Firefox 116 on Manjaro GNOME and it does not work; Alt+B gets inhibited by the browser to open the drop-down bookmarks menu. Alt+A does nothing, as does A and B.
Oh, never mind, just checked and the key combo for accesskey
s is different on Firefox (see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey )
It does work with Alt+Shift+A/B