Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Can javascript recognize mouse movements?

I would like to know if there is a way to "monitor" mouse movements. I'm developing automation in python and I don't know if there's a way for javascript to recognize what I'm planning to do. I think teleporting the mouse pointer could give some hint of automation. I think disguising the movement could be an option. I plan to use Pyautogui, Selenium wouldn't run what I need.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You can detect mouse movement by listening for the mousemove event and get the coordinates of the pointer with MouseEvent.pageX and MouseEvent.pageY:

document.addEventListener('mousemove', function(e){
  const xCoordinate = e.pageX;
  const yCoordinate = e.pageY;
  output.innerHTML = `x: ${xCoordinate}, y: ${yCoordinate}`
})
<p id="output"></p>

about 4 years ago · Juan Pablo Isaza Denunciar

0

Html Code

<div onmousemove="myFunction(event)"></div>

Js code

function myFunction(e) {
  var x = e.clientX;
  var y = e.clientY;
  var coor = "Coordinates: (" + x + "," + y + ")";
  document.getElementById("demo").innerHTML = coor;
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda