Socket
Socket
Sign inDemoInstall

@splayer/osx-mouse-cocoa

Package Overview
Dependencies
15
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @splayer/osx-mouse-cocoa

Mouse tracking for macOS using Cocoa APIs


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

osx-mouse-cocoa

Mouse tracking for macOS. Receive the screen position of various mouse events.

npm install osx-mouse-cocoa

This is a fork of osx-mouse that works on macOS Mojave without accessibility permissions. Unlike osx-mouse, the events are only emitted when the application is in focused. Even when the application is unfocused, move events are still generated when hovering over the application windows.

Usage

The module returns an event emitter instance.

var mouse = require('osx-mouse-cocoa')();

mouse.on('move', function(x, y) {
	console.log(x, y);
});

To stop tracking events, call mouse.destroy(). The mouse.ref() and mouse.unref() methods have been retained for API compatibility with osx-mouse, but they have no effect.

The events emitted are: move, left-down, left-up, left-drag, right-up, right-down and right-drag. For each event the screen coordinates are passed to the handler function.

Keywords

FAQs

Last updated on 30 Dec 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc