Skip to content

nenning/DoubleClickFix

Repository files navigation

๐Ÿ–ฑ๏ธ Double-click Fix

.NET ย  GitHub release (latest by date) ย  License ย  Microsoft Store

A lightweight solution for mitigating double-click issues caused by malfunctioning mice.

New in release 1.5: ๐Ÿ–ฑ๏ธ Mouse Wheel Fix โ€“ if you have problems with a "bouncy" or "jittery" mouse wheel, you can now enable a fix for it in the UI!

New in release 1.4: ๐ŸŽ‰ Experimental Drag & Drop Support โ€“ if you have problems with dragging, enable this feature in the UI! The tool will maintain a stable drag until you intentionally release.

This tool ensures smoother operation by filtering unintended double-click events and supporting reliable drag-and-drop gestures, allowing you to define the minimal delay between valid clicks directly from an intuitive user interface.

๐Ÿ›๏ธ Get it from the Microsoft Store!

logo

๐Ÿ“‹ Table of Contents


โœจ Features

  • Drag & Drop Fix (New!): You can enable this in the UI. Hold, drag, and drop reliably โ€” even if your mouse switch chatters during the gesture. A short pause while dragging is treated as the true release, preventing accidental drops.
  • Mouse Wheel Fix: Filters out spurious mouse wheel events to prevent accidental scrolling.
  • Customizable Delay: Adjust the minimal delay between two clicks via a user-friendly interface. Default is 50โ€ฏms.
  • Customize for Specific Mouse Buttons: Choose which mouse buttons to fix, including left, right, middle, X1, and X2. Default is left mouse button only.
  • Windows Tray Integration: Double-click the tray icon to open the settings UI.
  • Startup Option: Register the application to launch with Windows. The app tries to do this automatically when you launch it the first time.

logo

๐Ÿ” How It Works: Filtering Mouse Clicks

This application intercepts mouse events at a low level to distinguish between intentional clicks and unintentional "bouncing" or "chattering" from a faulty mouse switch. Hereโ€™s a step-by-step breakdown of the process:

  1. Low-Level Mouse Hook: The application registers a WH_MOUSE_LL (low-level mouse) hook. This allows it to intercept mouse input events system-wide before they are passed to applications.
  2. Event Interception: Every mouse event, such as WM_LBUTTONDOWN (left button down) or WM_MOUSEMOVE (mouse move), is captured by a callback function.
  3. Double-Click Filtering:
    • When a mouse button down event occurs, the application measures the time elapsed since the last corresponding up event for that same button.
    • If this duration is shorter than the user-defined threshold (e.g., 50 ms), the event is considered an erroneous double-click and is "swallowed" or ignored. This prevents the system and other applications from ever receiving it.
    • If the duration is longer than the threshold, the click is considered intentional and is passed along to the system as usual.
  4. Drag & Drop Correction: Faulty mice can also interfere with drag-and-drop operations by sending spurious "up" events while the button is being held down. The "Fix dragging issues" feature addresses this:
    • Entering Drag-Lock: When you press and hold a mouse button and then move the cursor beyond a small distance, the application enters a "drag-lock" mode for that button.
    • Suppressing Jitter: While in drag-lock, any subsequent down or up events for that button are ignored. This ensures that the drag is not accidentally interrupted.
    • Releasing the Drag: The drag is released only when you stop moving the mouse for a user-defined period (the "Drag release delay"). At that point, a genuine "up" event is sent, completing the drag-and-drop action.
  5. Mouse Wheel Filtering:
    • Faulty mouse wheels can send spurious scroll events, often in the opposite direction of the intended scroll, causing a "jittery" or "bouncy" effect. The mouse wheel fix addresses this:
    • Direction-Aware Filtering: The application tracks the direction of the last scroll event (up/down or left/right).
    • Time-Based Debouncing: If a new scroll event occurs in the opposite direction of the previous one within a very short time (the user-defined threshold), it is considered "jitter" and is ignored.
    • Preserving Fast Scrolling: This direction-aware approach ensures that fast, intentional scrolling in the same direction is not affected, providing a smooth experience while only filtering out the erroneous "bounce-back" events.
  6. Forwarding Events: Any event that is not filtered out is forwarded to the next hook in the chain using CallNextHookEx, ensuring normal mouse behavior for all other applications.

This entire process is highly efficient and runs in the background with minimal performance impact, ensuring a smoother experience without interfering with your regular workflow or gaming.


๐Ÿ–ฅ๏ธ System Requirements

  • Operating System: Windows 10 or later.
  • .NET Runtime: .NET 8.0 Desktop Runtime or later (usually installed automatically).

๐Ÿš€ Installation

The following options are supported for installing and running the application:

Install from Microsoft Store (recommended)

  1. Go to the Store page and install it.

Manual Setup

  1. Download: Grab the latest release from the Releases page.
  2. Unzip & Run: Extract the files and execute the .exe.
    • Note: Settings are stored in the registry under HKEY_CURRENT_USER\Software\DoubleClickFix.
    • Note: If you move the app to a different folder, you have to deregister & re-register the app to start with Windows.

Advanced Setup

  • Build from Source: Clone the repository and compile the application yourself using Visual Studio or your preferred .NET toolchain.

โš™๏ธ Configuration

๐Ÿ› ๏ธ Settings

  • Settings can be adjusted in the UI, including:
    • Per-button delay: Minimal delay (in ms) between clicks for each button.
    • Fix dragging issues: Enables this only if you have problems with dragging (& dropping).
    • Drag start delay: The time (in ms) a drag action must take to enter the drag lock state.
    • Drag release delay: The time (in ms) you must hold the button after stopping movement before the release is registered. Alternatively, you can manually click to exit the drag lock.
    • Workaround for touch devices: All double-clicks from touchpads or touchscreens are allowed by default. If you have trouble with this, enable the Allow 0โ€ฏms Double-Click Duration option in the UI.

๐Ÿ’ก Tips

  • Check the logs in the UI for detailed information on the elapsed time between your mouse clicks and filterd out double-clicks.
  • Experiment with different delay settings to optimize for your personal double-click speed and specific hardware issues.
  • Use the test area on the right side of the UI to test your settings (try also triple-clicking to select a whole paragraph and selecting text).

๐Ÿค Contributions

Contributions are welcome! Feel free to open issues, submit pull requests, or suggest improvements via the Issues tab.


๐Ÿ“œ License

This project is distributed under the MIT License.


๐ŸŽฎ Compatibility with Anti-Cheat Software (VAC, EAC, BattlEye, etc.)

How DoubleClickFix Works

This application uses a low-level mouse hook (WH_MOUSE_LL) to intercept and process mouse input events system-wide. Its sole purpose is to filter rapid, unintended clicks from faulty hardware and to stabilize drag-and-drop gestures. It does not:

  • Inject code into other processes.
  • Read or write the memory of any game.
  • Modify game files or assets.
  • Automate gameplay or provide any unfair advantage.

Why This Is Generally Safe

Modern anti-cheat systems like Valve Anti-Cheat (VAC), Easy Anti-Cheat (EAC), and BattlEye are primarily designed to detect software that gives players an unfair competitive advantage. Their detection methods focus on:

  1. Known Cheat Signatures: Scanning for hashes of known cheating programs.
  2. Process/Memory Manipulation: Detecting unauthorized interaction with the game's process and memory space.
  3. Code Injection: Identifying attempts to inject DLLs or other code into the game client.

DoubleClickFix operates at the Windows input level, far removed from the game-specific vectors that anti-cheat systems monitor. Many legitimate accessibility tools and hardware drivers use similar low-level hooks without issue.

Disclaimer: While the risk is extremely low, no third-party tool can be guaranteed to be 100% safe with all present and future anti-cheat systems. The use of any system-level tool alongside protected games is at your own discretion. However, given its function and architecture, DoubleClickFix is considered a low-risk utility for addressing a hardware-level problem.

For official information, refer e.g. to Valve's VAC documentation.


๐Ÿ› ๏ธ Technical Notes

Some technical details - mostly for development.

๐Ÿ–ฅ๏ธ Command-Line Arguments

  • -nohook โ€“ Runs the app without registering the mouse hook. Useful for UI testing or debugging (automatically applied in debug mode).
  • -interactive or -i โ€“ Displays the UI on startup. Useful for testing (automatically applied in debug mode).

๐ŸŒ Language Override

  • The application language can be overridden by setting the languageOverride key in the app.config file (for testing purposes).

๐Ÿ“ฆ Creating a Release

Github

  • To create a github release (zip), run the following commands:
    • git tag -a v1.0.1.0
    • git push origin v1.0.1.0
  • This will trigger the GitHub Action that creates the release.
  • Add the release notes on GitHub.

Microsoft Store

  • If needed, adjust the version in Package.appxmanifest.
  • To create a store package, use Publish โ†’ Create App Packages in Visual Studio.
  • Publish it through the Partner Portal: upload the package (.msixbundle), fill in the details and submit it for certification.

About

Mitigates double-click issues caused by malfunctioning mice.

Resources

License

Stars

Watchers

Forks