npm

@xyh19/combo-keys
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Welcome to combo-keys 👋

Version License: MIT

🏠 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

Readme

Keywords

Package Sidebar

Install

npm i @xyh19/combo-keys

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

49.5 kB

Total Files

15

Last publish

Collaborators

  • xyh19