flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
163.63k stars 26.91k forks source link

Change mouse wheel sensitivity at runtime on Windows #149086

Open wenyue opened 1 month ago

wenyue commented 1 month ago

Use case

Flutter reads the Windows Mouse system configuration at startup, but can not be modified at run time. We should be able to configure different mouse wheel sensitivity for each flutter program, at runtime.

Proposal

Add a function to modify the sensitivity of the mouse wheel.

darshankawar commented 1 month ago

@wenyue Can you check if there's any community package that already offers this feature ? Maybe https://pub.dev/packages/dyn_mouse_scroll

Also, can you check if the sensitivity can be adjusted via mouse settings itself that helps in your case ?

wenyue commented 1 month ago

No, I hope flutter can modify it globally instead of modifying each widget individually.

darshankawar commented 1 month ago

@wenyue Isn't this issue similar to your case ? Because this comment seems to also say same as current behavior you mentioned ?

After https://github.com/flutter/engine/pull/32094, Flutter apps read this scroll speed setting once at startup. However, changing the scroll speed setting doesn't update Flutter apps that are already running.

wenyue commented 1 month ago

Not exactly the same. I want to be able to set the sensitivity of Flutter's mouse wheel without being affected by system settings. This allows for more flexibility.

loic-sharma commented 3 weeks ago

I'm not aware of any Flutter APIs that allow configuring the mouse wheel sensitivity globally across the app. I imagine we'd want such an API to work across all platforms, not just Windows. I'll re-route to the framework team to get their opinion.