Giter VIP home page Giter VIP logo

Comments (7)

Evidlo avatar Evidlo commented on June 30, 2024

That's not normal. The normal behavior is that the tablet input is scaled so that the entire monitor is covered.

from remarkable_mouse.

sr1920 avatar sr1920 commented on June 30, 2024

I was debugging the problem and I found a solution. I found this in file pynput.py:

scaling = ratio_width if ratio_width > ratio_height else ratio_height

The same scaling is considered in the horizontal and vertical axes. As the width of my screen is higher than its height, the width determines the scaling and so it does not work well in the vertical dimension. I think that a different scaling should be considered for the X and Y. Does this make sense? I tested this idea and my problem is solved by replacing the previous line by:

return (
    ratio_width * (x - (stylus_width - monitor.width / ratio_width) / 2),
    ratio_height * (y - (stylus_height - monitor.height / ratio_height) / 2)
)

All seems to work well now, but maybe there is some collateral effect that I cannot foresee...

I'm not sure about the meaning of the width_mm and height_mm parameters (?). This might have an impact also (I saw somewhere the use of the values 310 and 174 for these parameters).

Now the only problem that I finding is that I think that the current configuration is extremely sensitive to movements. Maybe the solution would be to slow down the speed of the mouse, but I'm not sure about whether this is the problem or how to do that.

from remarkable_mouse.

Evidlo avatar Evidlo commented on June 30, 2024

I think that a different scaling should be considered for the X and Y

Probably not a good idea. Whatever you draw on the tablet will squished in the X or Y direction on the monitor.

I added a --mode option with the latest commit on master to switch between fit and fill modes.

I'm still confused why you're seeing this because the previous behavior was to fill the monitor.

I'm not sure about the meaning of the width_mm and height_mm parameters

The only parameters I use from screeninfo.Monitor are the screen size (width, height) and offset (x, y).

from remarkable_mouse.

Evidlo avatar Evidlo commented on June 30, 2024

Is this still an issue? Have you tested since those commits I mentioned?

from remarkable_mouse.

sr1920 avatar sr1920 commented on June 30, 2024

I have just tried with the last version, but I get an error:

.../opt/anaconda3/lib/python3.7/site-packages/screeninfo/screeninfo.py", line 47, in get_monitors
raise ScreenInfoError("No enumerators available")
screeninfo.common.ScreenInfoError: No enumerators available

The previous version (with the modifications I indicated) still works for me.

from remarkable_mouse.

sr1920 avatar sr1920 commented on June 30, 2024

Two clarifications:

  1. Sorry, I didn't remember that this error also happened before with the previous version and I solved it by avoiding the call to get_monitors (as I indicated in a previous message above). With this change, the new version seems to work well without any adjustments when my space is the whole screen.

  2. However, I have a specific use case where I restrict the area of the screen where I want the application to work (e.g., I create a window in Paint and I want the mouse to move only within that window). For that purpose, I define the boundaries of my window as if they were the boundaries of the whole screen; e.g.:

monitor = Monitor(
x=0,
y=47,
width=918,
height=690,
#width_mm=310,
#height_mm=174
)

In this case, the behavior is still wrong. My modified version with the scaling hack mentioned above behaves well in this scenario.

from remarkable_mouse.

Evidlo avatar Evidlo commented on June 30, 2024

Let me know if this is still an issue.

from remarkable_mouse.

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.