Skip to content

Conversation

@toucheres
Copy link

平滑与抖动抑制
添加用户个性化自定义: X/Y 移动灵敏度(推荐600,600)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the touchpad drawing/writing experience by implementing cursor movement smoothing and jitter suppression, along with user-configurable tap/drag sensitivity settings.

Key changes:

  • Added exponential moving average smoothing algorithm with configurable deadzone to reduce cursor jitter
  • Implemented enhanced tap vs drag detection logic based on duration and movement thresholds
  • Added UI controls and configuration persistence for sensitivity customization (tap duration, X/Y movement thresholds)

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 21 comments.

File Description
MapTP.App/MouseProcessor.cs Added smoothing algorithm with deadzone, introduced constants for readability, and refactored cursor movement logic
MapTP.App/MainWindow.xaml.cs Implemented tap/drag detection state machine, added sensitivity configuration loading/saving, and extended Config class with new sensitivity properties
MapTP.App/MainWindow.xaml Added UI controls for sensitivity configuration (tap time, X/Y movement thresholds) with Apply button
.gitignore Added .vscode directory to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lingrottin
Copy link
Owner

稍等我在本地测试一下。以及,请确认一下,推荐值到底是 1200,还是 600?

@lingrottin
Copy link
Owner

整体效果很好,但是此处有一个问题。
考虑一下,如果在防抖功能启用后

  • 轻触 A 点,然后松开
  • 轻触 B 点,然后松开
    如果 A 点和 B 点的间隔较大,实际上光标会相对缓慢(速度依靠手指滑动的速度而定)地从屏幕上 A 点对应的位置移动到 B 点对应的位置,这并不符合预期的逻辑。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants