https://github.com/jasminmif/react-tab-hotkey-replacer
React component which can replace the Tab Key behavior with enter or another keyboard key
https://github.com/jasminmif/react-tab-hotkey-replacer
hotkey hotkey-replacer react react-hotkey react-hotkeys react-tab-hotkey react-tab-hotkey-replacer tab-enter tab-hotkey-replacer tab-to-enter
Last synced: 11 months ago
JSON representation
React component which can replace the Tab Key behavior with enter or another keyboard key
- Host: GitHub
- URL: https://github.com/jasminmif/react-tab-hotkey-replacer
- Owner: jasminmif
- Created: 2019-05-05T21:36:45.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:05:42.000Z (over 3 years ago)
- Last Synced: 2025-04-06T08:42:20.707Z (about 1 year ago)
- Topics: hotkey, hotkey-replacer, react, react-hotkey, react-hotkeys, react-tab-hotkey, react-tab-hotkey-replacer, tab-enter, tab-hotkey-replacer, tab-to-enter
- Language: JavaScript
- Homepage:
- Size: 150 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-tab-hotkey-replacer
Is a simple react component which can replace the Tab Key behavior with enter or another keyboard key
## Basic Usage
```javascript
import React, { Component } from 'react';
import ReactTabHotkeyReplacer from 'react-tab-hotkey-replacer';
class App extends Component {
showAlert() {
alert(1);
}
render() {
return (
{/* If no shortcut prop is assigned, default will be enter */}
);
}
}
export default App;
```
### Available shortcuts
Default shortcut is enter key, but you can change it to any keyboard key like: ctrl, space, shift, or a aphanumerical type: e or 0
## Install
##### npm
```
npm install react-tab-hotkey-replacer --save
```
## Authorship
All credit, and many thanks, goes to [Jasmin Miftari](https://github.com/jasminmif) for the inception of `react-tab-hotkey-replacer` and all versions before `1.0.0`.