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
- Host: GitHub
- URL: https://github.com/exizt/webhotkey-js
- Owner: exizt
- License: gpl-2.0
- Created: 2018-10-23T09:31:56.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T01:20:00.000Z (over 1 year ago)
- Last Synced: 2025-01-06T04:28:01.348Z (4 months ago)
- Topics: javascript, typescript
- Language: TypeScript
- Homepage:
- Size: 255 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```htmlimport webHotKey from '../dist/webhotkey.min.js';
webHotKey.setOptions({
attributeName: "myAccessKey"
})```