Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-keybinding-component

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-keybinding-component - npm Package Compare versions

Comparing version 0.5.2 to 1.0.0

dist/keybinding.d.ts

26

package.json
{
"name": "react-keybinding-component",
"version": "0.5.2",
"version": "1.0.0",
"description": "A React keybinding component",
"main": "dist/react-keybinding-component.js",
"main": "dist/keybinding.js",
"files": [
"dist"
],
"scripts": {
"compile": "gulp",
"test": "echo \"Error: no test specified\" && exit 1"
"prepublishOnly": "npm run build",
"build": "tsc",
"test": "jest",
"test:watch": "jest --watch"
},

@@ -33,7 +38,10 @@ "repository": {

"devDependencies": {
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
"gulp": "^3.9.0",
"gulp-babel": "^6.1.1",
"gulp-rename": "^1.2.2"
"@types/jest": "^23.3.9",
"@types/prop-types": "^15.5.6",
"@types/react": "^16.7.6",
"@types/react-dom": "^16.0.10",
"jest": "^23.6.0",
"react": "^16.6.3",
"ts-jest": "^23.10.4",
"typescript": "^3.1.6"
},

@@ -40,0 +48,0 @@ "dependencies": {

@@ -30,11 +30,11 @@ # react-keybinding-component

All properties are optional.
All properties except `onKey` are optional.
| Property | Description | Default value |
|--------------------|---------------------------------------------|---------------|
| onKey | the function executed after a key event | () => {} |
| type | keyup or keydown | `'keydown'` |
| target | the element you want to attach the event to, it can be an **existing** DOM element or a CSS selector (in that case, you will need to add a `tabIndex='0'` to your element, otherwise the event won't be caught) | `document` |
| preventInputConflict | prevent onKey from firing if you have an onChange on an input, a textarea or a select | `false` |
| preventDefault | prevent event default | `false` |
| preventPropagation | prevent event propagation | `false` |
| Property | Description | Default value |
|------------------------|---------------------------------------------|---------------|
| `onKey` (required) | the function executed after a key event | () => {} |
| `type` | keyup or keydown | `'keydown'` |
| `target` | the element you want to attach the event to, it can be an **existing** DOM element or a CSS selector (in that case, you will need to add a `tabIndex='0'` to your element, otherwise the event won't be caught) | `document` |
| `preventInputConflict` | prevent onKey from firing if you have an onChange on an input, a textarea or a select | `false` |
| `preventDefault` | prevent event default | `false` |
| `preventPropagation` | prevent event propagation | `false` |
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc