An open API service indexing awesome lists of open source software.

https://github.com/exizt/webhotkey-js

web hot key
https://github.com/exizt/webhotkey-js

javascript typescript

Last synced: 2 months ago
JSON representation

web hot key

Awesome Lists containing this project

README

        

# WebHotKey JS
> The `accesskey` attribute in HTML allows for the use of keyboard shortcuts on websites by default. However, there is a difference in the shortcut key combinations between `Chrome (alt+key)` and `Firefox (alt+shift+key)`. The following script is designed to harmonize this discrepancy by setting a common behavior for both browsers, using `alt+shift+key` as the universal key combination.

You can configure keyboard shortcuts using `shift` + `alt` + `alphanumeric`.

- https://github.com/exizt/webhotkey-js

## Usage
### Setup
html
```html

```

or

```html

import webHotKey from '../dist/webhotkey.min.js';

```

By default, keyboard connectivity is established with a tag that has the 'hotkey' attribute.
```html

```

### using CDN
```html

```

### Customize
#### Options
- `attributeName` : Reassign of key attribute name.
- `isDebug` : debugging option.

#### how to use
example
```html

import webHotKey from '../dist/webhotkey.min.js';

webHotKey.setOptions({
attributeName: "myAccessKey"
})

```