Skip to content

Conversation

@haoxv
Copy link
Contributor

@haoxv haoxv commented Dec 31, 2025

Ring to thumb pinch and little finger to thumb pinch are not reliable for many head set. This change adds option to use grab (pinch) and move gesture to imitate scrolling and knob turning. This is espeically useful for MSFS 2020 as it does not support touch screen. The feature is enabled when "Pinch to scroll" is disabled in HTCCSettings.

Copy link
Owner

@fredemmott fredemmott left a comment

Choose a reason for hiding this comment

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

Thanks, this is a great start :)

  1. this needs a separate option in both the UI and the registry: there are controls in some planes that must be held, but also support scrolling - so there needs to be a way to disable this. I don't think there's a reasonable jitter value that won't have a large amount of either false positives or negatives, so I think this needs to be user preference

  2. use clang-format. If you're using an IDE, its' code formatting option will probably use clang-format as thhere's a .clang-format file

@haoxv
Copy link
Contributor Author

haoxv commented Jan 2, 2026

Can we reuse Config::PinchToScroll to differentiate between different gestures for scrolling, use ring and little finger pinch if true, and index finger pinch and move if false? Or we add another reg item GrabMovetoScroll and keep PinchToScroll always true?

@fredemmott
Copy link
Owner

Sorry for the delay; I think this should be a separate option.

PinchToScroll should be entirely independent, and only affect other fingers

haoxv and others added 3 commits January 25, 2026 21:20
- Add new boolean config: GrabMoveToScroll (default: false)
- Allows enabling/disabling grab move to scroll feature
- Part of grab_move_scroll feature branch

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Adds a configurable scale factor for grab-move-to-scroll gesture.
Default is 1.0, DCS configured to 4.0 via registry override.
@haoxv
Copy link
Contributor Author

haoxv commented Jan 26, 2026

I made the changes you requested, using reg instead. Please take a look

@haoxv haoxv requested a review from fredemmott January 27, 2026 01:51
Copy link
Owner

@fredemmott fredemmott left a comment

Choose a reason for hiding this comment

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

Can you also re-submit the diff with the .reg files submitted as text, not binary diffs, so the changes can be viewed and tracked correctly?

Thanks!

@haoxv
Copy link
Contributor Author

haoxv commented Jan 27, 2026

Can you also re-submit the diff with the .reg files submitted as text, not binary diffs, so the changes can be viewed and tracked correctly?

Thanks!

I resubmitted. But it seems that the original MSFS.reg and DCS.reg are UTF-16 coded. I tried to made it text but still showes as binary. You can view it directly as text though

@fredemmott
Copy link
Owner

Why is a reg change needed, especially changing both per-game overrides?

  • default value (either way) can be set in the config struct, it doesn't need the registry
  • default should be previous behavior

@haoxv
Copy link
Contributor Author

haoxv commented Jan 27, 2026

I could make GrabMoveToScroll initialize to false and out of the reg file and have it set by the HTCCsetting only. But for GrabMoveToScrollScale, it is still better to set in reg file as it is different for DCS and MSFS.

Copy link
Owner

@fredemmott fredemmott left a comment

Choose a reason for hiding this comment

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

FWIW, the regedit files are UTF-16 because they are/were originally raw exports from regedit, which uses UTF-16 because... classic windows.

@fredemmott fredemmott dismissed their stale review January 27, 2026 19:57

resolved.

@fredemmott
Copy link
Owner

This looks fine, but I want to re-review when I'm a bit less sick. Will hopefully merge tomorrow.

@fredemmott fredemmott self-requested a review January 27, 2026 19:57
@haoxv
Copy link
Contributor Author

haoxv commented Jan 27, 2026

One thing I noticed though is that when GrabMoveToScroll is set in the register file, the change in HTCCsetting makes no different. In that case, it might be better not putting GrabMoveToScroll in the reg fie, and let user to use HTCCsetting to configure it.

@fredemmott
Copy link
Owner

fredemmott commented Jan 27, 2026

yep, load order is:

  • default values from the struct
  • user settings
  • per-game overrides

If something's set later in the order, it takes precedence/overwrites previous values

The per-game files should generally not contain any preferences - just things that are required for a game to function correctly. The line between the two is sometimes a bit blurry, and sometimes preferences to need to be overriden - for example, the MSFS reg always sets controller emulation mode, as the touch screen emulation mode is only compatible with DCS.

@haoxv
Copy link
Contributor Author

haoxv commented Jan 29, 2026

I removed GrabMoveScroll setting from MSFS.reg.

@fredemmott fredemmott merged commit 8327ea2 into fredemmott:master Jan 29, 2026
3 checks passed
fredemmott added a commit that referenced this pull request Jan 29, 2026
- it's long enough
- I generally prefer early returns to nested ifs; makes it easier to follow. Extracting to a method makes this less brittle in case of future additions

refs #119
@haoxv haoxv deleted the grab_move_for_scrolling branch January 29, 2026 23:04
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