Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/montogeek/cmd-enter
Submit any form with Cmd+Enter
https://github.com/montogeek/cmd-enter
Last synced: 10 days ago
JSON representation
Submit any form with Cmd+Enter
- Host: GitHub
- URL: https://github.com/montogeek/cmd-enter
- Owner: montogeek
- Created: 2015-05-03T04:59:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-06T01:58:21.000Z (over 8 years ago)
- Last Synced: 2024-10-13T10:39:15.230Z (about 1 month ago)
- Language: HTML
- Homepage: http://montogeek.github.io/cmd-enter/
- Size: 21.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CmdEnter.js
Submit any form with (Cmd | Win | Ctrl) + Enter.
## Why?
Submit forms using Cmd + Enter (Mac) or Win + Ctrl (Windows) is a well known key combination that you may already use on Twitter, GitHub, Facebook, and another mayor websites.
It's great because is faster than move your mouse to click the submit button or hit tab to reach the submit button, you can save a few key strokes!.
## Demo
[See it in action!](https://montogeek.github.io/cmd-enter/).
## Installation
You can install it from npm
$ npm install cmdenter
## Usage
Just create a new CmdEnter.js instance and you are ready to go
```javascript
new CmdEnter();
```
This will bind the `cmd + enter` key combination to all `textarea` elements on the page. Optionally you can specify a CSS selector as first parameter. Example:
```javascriptnew CmdEnter('.comment')
new CmdEnter('#description')
new CmdEnter('form#register textarea')```
## Browser Support
- All modern browsers
## Made to you by
[Fernando Montoya](http://github.com/montogeek) (Frontend developer)[@montogeek](http://twitter.com/montogeek)
## License
MIT.