
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@listenai/uiohook-napi
Advanced tools
[](https://www.npmjs.com/package/uiohook-napi)
N-API C-bindings for libuiohook.
import { uIOhook, UiohookKey } from 'uiohook-napi'
uIOhook.on('keydown', (e) => {
if (e.keycode === UiohookKey.Q) {
console.log('Hello!')
}
if (e.keycode === UiohookKey.Escape) {
process.exit(0)
}
})
uIOhook.start()
interface UiohookNapi {
on(event: 'input', listener: (e: UiohookKeyboardEvent | UiohookMouseEvent | UiohookWheelEvent) => void): this
on(event: 'keydown', listener: (e: UiohookKeyboardEvent) => void): this
on(event: 'keyup', listener: (e: UiohookKeyboardEvent) => void): this
on(event: 'mousedown', listener: (e: UiohookMouseEvent) => void): this
on(event: 'mouseup', listener: (e: UiohookMouseEvent) => void): this
on(event: 'mousemove', listener: (e: UiohookMouseEvent) => void): this
on(event: 'click', listener: (e: UiohookMouseEvent) => void): this
on(event: 'wheel', listener: (e: UiohookWheelEvent) => void): this
keyTap(key: keycode, modifiers?: keycode[])
keyToggle(key: keycode, toggle: 'down' | 'up')
}
export interface UiohookKeyboardEvent {
altKey: boolean
ctrlKey: boolean
metaKey: boolean
shiftKey: boolean
keycode: number
}
export interface UiohookMouseEvent {
altKey: boolean
ctrlKey: boolean
metaKey: boolean
shiftKey: boolean
x: number
y: number
button: unknown
clicks: number
}
export interface UiohookWheelEvent {
altKey: boolean
ctrlKey: boolean
metaKey: boolean
shiftKey: boolean
x: number
y: number
clicks: number
amount: number
direction: WheelDirection
rotation: number
}
FAQs
[](https://www.npmjs.com/package/uiohook-napi)
The npm package @listenai/uiohook-napi receives a total of 1 weekly downloads. As such, @listenai/uiohook-napi popularity was classified as not popular.
We found that @listenai/uiohook-napi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.