How to implement keyboard shortcuts on websites

依然范特西╮ 提交于 2019-11-29 04:32:49
rik

As a starter: http://plugins.jquery.com/project/hotkeys

[Edit 1/14/14: Dead link. See the Github page instead]

I've used jQuery.hotkeys by John Resig, and it works pretty well with the latest jQuery. Have a look at the static page samples on the github page.

Maybe also look into using the accesskey attribute.

Take a look at Mousetrap as well.

http://craig.is/killing/mice

It supports all types of key events as well as combinations and sequences.

Try this plugin http://www.mattytemple.com/projects/shortcut-js/. It is simplistic in purpose and handles single combinations effectively.

If you need better implementation with more flexibility go for Mousetrap Plugin as specified by @craig in the previous answer.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!