webcito / jquery-typing-events
The jQuery plugin simplifies the events that take place in an input field. The default properties are not overwritten.
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
pkg:composer/webcito/jquery-typing-events
Requires
- components/jquery: >=3.6.0
This package is auto-updated.
Last update: 2025-10-15 13:02:41 UTC
README
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). |