1.0.0 • Published 3 years ago

@xyh19/combo-keys v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

🏠 Homepage

Getting Started

install

npm install @xyh19/combo-keys

usage

import { ComboKeys } from '@xyh19/combo-keys'

const comboKeys = new ComboKeys([
  ['Ctrl+V', () => {
    // ...do somethings
  }],
  ['Ctrl+LeftClick', () => {
    // ...do somethings
  }]
])
window.addEventListener('mouseup', (e) => comboKeys.dispatch(e))
window.addEventListener('mousedown', (e) => comboKeys.dispatch(e))
window.addEventListener('keydown', (e) => comboKeys.dispatch(e))

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator