
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
@quickey/keyboard
Advanced tools
@quickey/keyboardKeyboard events as streams
Quickey Keyboard is a tool that simplify the way you add listeners to keyboard events. instead of creating event listeners, the keyboard creates only one listener and pipes it to your streams.
Quickey Keyboard can be installed via npm:
$ npm install --save @quickey/keyboard
Or via yarn:
$ yarn add @quickey/keyboard
Or using the CDN:
<script src="https://unpkg.com/@quickey/keyboard@latest/umd/quickey.keyboard.js"></script>
Or the minified version:
<script src="https://unpkg.com/@quickey/keyboard@latest/umd/quickey.keyboard.min.js"></script>
import { keyboard, Keyboard } from "@quickey/keyboard";
// Or when using the UMD module
const { keyboard, Keyboard } = Quickey.keyboard;
keyboard.getStream('keydown').pipe(console.log);
const k = new Keyboard(document.querySelector("input[type=text]"));
k.getStream('keyup').pipe(console.log);
keyboard.getStream('keydown').unpipe(console.log);
For your convenience, we created this Fiddle, so you can take Quickey Keyboard for a quick spin.
Type: constructor
Creates a new keyboard.
Type: EventTarget
The target EventTarget to bind keyboard events.
Get or create event stream.
Type: string
Can be any keyboard event name (e.g. keyup, keydown).
Returns: KeyboardEventReadStream
Checks if a key is active (pressed down).
Type: string
The key, character or name, lower cased (e.g. a, b, control, alt).
Returns: boolean
Reset active keys.
Destroys the keyboard and closes all streams.
Type: EventTarget
Get the keyboard target.
Type: number
Get the number of active keys.
Creates a new KeyboardEventReadStream.
Type: string
Can be any keyboard event name (e.g. keyup, keydown).
Type: EventTarget
Default: document
The stream target.
Pipe the event to the given stream.
Type: KeyboardEventWriteStream
Returns: Current KeyboardEventReadStream instance.
Unpipe the given stream.
Type: KeyboardEventWriteStream
Returns: Current KeyboardEventReadStream instance.
Closes the stream.
Type: boolean
Get the current state of the stream.
A function that receives a keyboard input, if the function returns
false, the write stream will stop the chain for the given event and won't
continue for the next stream.
Type: object
Type: string
Type: number
Returns: boolean | void
← Go back to Quickey
FAQs
Keyboard events as streams
We found that @quickey/keyboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.