Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomasdev-de/jquery-typingevents
The jQuery plugin simplifies the events that take place in an input field. The default properties are not overwritten.
https://github.com/thomasdev-de/jquery-typingevents
delay events javascipt javascript jquery jquery-plugin typing
Last synced: 6 days ago
JSON representation
The jQuery plugin simplifies the events that take place in an input field. The default properties are not overwritten.
- Host: GitHub
- URL: https://github.com/thomasdev-de/jquery-typingevents
- Owner: ThomasDev-de
- Created: 2023-09-12T13:01:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-15T08:28:29.000Z (over 1 year ago)
- Last Synced: 2024-12-21T06:07:50.817Z (about 1 month ago)
- Topics: delay, events, javascipt, javascript, jquery, jquery-plugin, typing
- Language: HTML
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jquery-typingEvents
The jQuery plugin simplifies the events that take place in an input field. The default properties are not overwritten.
## options
| name | type | default | description |
|---------------|----------|-------------------------------|------------------------------------------------------------------------------------------------------|
| delay | int | `400` | The time in milliseconds after the last keystroke was made and the event `typingEnd` is triggered. |
| allowedKeys | array | `[]` | A list for allowed keys (e.g. `['a','b',..]`) |
| preventedKeys | array | `[]` | A list for forbidden keys (e.g. `['a','b',..]`) |
| trim | string | `".,\|]\\^"` | Characters that are trimmed from the input after the event `typingEnd` (except for password fields). |
| onKeyDown | function | `(event, key, allowed) => {}` | The function is triggered with each keystroke. |
| onKeyUp | function | `(key) => {}` | The function is triggered each time a keystroke is released. |
| onPrevented | function | `(key) => {}` | The function is triggered when the keystroke is not allowed. |
| onTypingStart | function | `() => {}` | The function is triggered when an input starts. |
| onTypingEnd | function | `(value) => {}` | The function is triggered when an input ends (measured by the `delay` property). |## events
| event | params | |
|-----------------------------------------------------------|--------------------|----------------------------------------------------------------------|
| key.any | e, key, allowed | Triggered with each keystroke. |
| kex.A
key.a
key.B
key.b
key.Shift
... | e, key, allowed | Triggered on each specific keystroke. |
| key.prevented | e, key | Triggered on each forbidden keystroke. |
| typingStart | e | Triggered at the start of the input. |
| typingEnd | e, value (trimmed) | Triggered at the end of the input (measured by the `delay property). |