simple-hotkeys

WebJar for simple-hotkeys

License

License

MIT
Categories

Categories

KeY Data Data Formats Formal Verification
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

simple-hotkeys
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

simple-hotkeys
WebJar for simple-hotkeys
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mycolorway/simple-hotkeys

Download simple-hotkeys

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/simple-hotkeys/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>simple-hotkeys</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/simple-hotkeys/
implementation 'org.webjars.bower:simple-hotkeys:1.0.3'
// https://jarcasting.com/artifacts/org.webjars.bower/simple-hotkeys/
implementation ("org.webjars.bower:simple-hotkeys:1.0.3")
'org.webjars.bower:simple-hotkeys:jar:1.0.3'
<dependency org="org.webjars.bower" name="simple-hotkeys" rev="1.0.3">
  <artifact name="simple-hotkeys" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='simple-hotkeys', version='1.0.3')
)
libraryDependencies += "org.webjars.bower" % "simple-hotkeys" % "1.0.3"
[org.webjars.bower/simple-hotkeys "1.0.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.bower : jquery jar [2,3)
org.webjars.bower : simple-module jar [2,3)

Project Modules

There are no modules declared in this project.

simple-hotkeys

Options

  • el - jQuery selector / jQuery Object / Node;

If you want to bind hotkeys to dynamic adding element, please pass a selector as el.
If the el is null or doesn't exist, document element would be used by default.

Api

  • add(shortcut, callback(e)) - add a hotkey.
  • remove(shortcut) - remove a hotkey
  • destroy() - off events and clean up.

Usage

hotkeys = simple.hotkeys();
hotkeys.add("ctrl + b", function(e){
    console.log("ctrl + b pressed");
}).add("ctrl + h"], function(e){
    console.log("Help");
});
org.webjars.bower

彩程设计

Versions

Version
1.0.3