Giter VIP home page Giter VIP logo

Comments (4)

moses-palmer avatar moses-palmer commented on July 20, 2024 1

I have done some preliminary testing on Windows, and the result is positive. The interface I am testing out adds the property pynput.mouse.Listener.cursor, which is of an enum type similar to pynput.mouse.Button.

I have pushed a work-in-progress here if you would like to test it.

from pynput.

moses-palmer avatar moses-palmer commented on July 20, 2024

This appears to be somewhat possible on win32, X and OSX.

  • On win32, GetCursorInfo combined with LoadCursor could possibly be used.
  • On OSX, the currentSystemCursor attribute could be used.
  • On X, XFIXES could possibly be used if the rest of the system can be relied upon to set a cursor name.

All in all, this would be quite a lot of work. What is your use case?

from pynput.

humanely avatar humanely commented on July 20, 2024

A common interface for getting that info could have been useful. I am primarily concerned with drag actions which may be used to move objects or change window sizes. It would be convenient if the mouse cursor info is available to differentiate those 2 actions.

from pynput.

moses-palmer avatar moses-palmer commented on July 20, 2024

I will close this. The implementation turned out to be too unreliable, and impossible to get to work cross-platform.

from pynput.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.