API可动态更改win10触摸板'光标速度'而无需重新启动 [英] API to change win10 touchpad 'cursor speed' dynamically without restarting

查看:323
本文介绍了API可动态更改win10触摸板'光标速度'而无需重新启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要在我们的应用程序中减少特定状态下的触摸板光标速度。因此,我计划在应用程序进入特定状态时,我们将使用某些Windows API在运行时更改触摸板游标速度。当退出特定状态时,将触摸板光标速度恢复为原始值。



但是,我没有找到任何Windows API来动态更改触摸板'光标速度'而无需重新启动。我找到了改变鼠标速度的API(SystemParametersInfo)。但是这个API只会改变鼠标光标的速度。它不会改变触摸板的光标速度。



我尝试更改以下注册表。但是更改注册表的问题是触摸板游标速度只有在系统重启后才会更新。我需要一个API来更改触摸板光标速度而无需重新启动系统(类似于我们如何使用SystemParametersInfo更改鼠标速度)



HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \\ Windows \ CurrentVersion\PrecisionTouchPad \ CursorSpeed



这方面的任何建议都会非常有帮助。



我尝试过:



我尝试更改以下注册表。但是更改注册表的问题是触摸板游标速度只有在系统重启后才会更新。我需要一个API来更改触摸板光标速度而无需重新启动系统(类似于我们如何使用SystemParametersInfo更改鼠标速度)



HKEY_CURRENT_USER \ SOFTWARE \ Microsoft \ Windows \\ Windows \ CurrentVersion \PrecisionTouchPad \CursorSpeed

解决方案

微软似乎很清楚他们对这种体验的期望;这可能就是为什么他们很难在运行中更改Windows设置。



通常使用输入事件来管理输入设备。当您检测到移动时,可以通过操纵鼠标/光标坐标来影响速度。



处理指针输入 - UWP app developer Microsoft Docs [ ^ ]

We need to reduce touchpad cursor speed in certain state in our application. So, i was planning that when the application enter a specific state, we will change touchpad cursor speed at run time by using some Windows API. And when coming out of the specific state, revert the touchpad cursor speed to original value.

However, i did not find any Windows API to change touchpad 'Cursor speed' dynamically without restarting. I found API to change mouse speed (SystemParametersInfo). But this API only changes the mouse cursor speed. It does not change touchpad cursor speed.

I tried changing the below registry. But the problem with changing registry is that touchpad cursor speed gets updated only after system restart. I need an API to change touchpad cursor speed without restarting system (similar to how we can change mouse speed using SystemParametersInfo)

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\CursorSpeed

Any suggestions in this regard will be really very helpful.

What I have tried:

I tried changing the below registry. But the problem with changing registry is that touchpad cursor speed gets updated only after system restart. I need an API to change touchpad cursor speed without restarting system (similar to how we can change mouse speed using SystemParametersInfo)

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\CursorSpeed

解决方案

Microsoft seems pretty clear about what they expect from the experience; which is probably why they make it difficult to change "Windows Settings" on the fly.

One usually uses "input events" to "manage" input devices. When you detect movement, you can affect speed then by manipulating the mouse / cursor coordinates.

Handle pointer input - UWP app developer | Microsoft Docs[^]


这篇关于API可动态更改win10触摸板'光标速度'而无需重新启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆