
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
mouse-change
Advanced tools
Listens for any mouse state changes.
require('mouse-change')(function(buttons, x, y) {
document.body.innerHTML =
'<p>Buttons: 0b' + buttons.toString(2) +
', x:' + x +
', y:' + y + '</p>'
})
npm i mouse-change
var l = require('mouse-change')([element, onchange(buttons,x,y,mods)])Listens for any mouse state changes on the given element.
element is an optional elementonchange(buttons,x,y,mods) is an optional callback which gets called every time that the mouse state changes inside element
buttons is the state of the mouse buttonsx is the x coordinate of the mousey is the y coordinate of the mousemods is an object storing the state of any key modifiers
mods.shift is the state of the shift keymods.alt is the state of then alt keymods.control is the state of the control keymods.meta is the state of the meta keyReturns A new listener object which can be used to configure the listener.
l.enabledToggles whether or not
l.xThe x coordinate of the mouse
l.yThe y coordinate of the mouse
l.buttonsThe button state of the mouse
l.modsThe current state of the keyboard modifiers
(c) 2015 Mikola Lysenko. MIT License
FAQs
Mouse state change listener
The npm package mouse-change receives a total of 855,405 weekly downloads. As such, mouse-change popularity was classified as popular.
We found that mouse-change 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.