Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for changing the sensitivity of relative mouse mode #563

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Nnubes256
Copy link

Fixes #42.

This PR introduces support on the iOS and tvOS apps for changing the mouse sensitivity within relative mouse ("Touchpad") mode. It does this by multiplying the delta movement sent to the host by a fixed factor which can be configured by the user in Settings.

On iOS, the setting provided is a slider with non-lineal behavior. While it has a multiplier range of 0.0 to 6.0, the default value of 1.0 stays in the middle; thus, the left side comprehends a range of [0.0, 1.0) and the right side uses a different range of [1.0, 6.0]. The option of having 0x sensibility is explicitely provided in order to unlock usecases in which locking the mouse cursor in a fixed place is desired.

In addition to that, the slider has a soft detent on the default 1.0x setting, which allows to quickly reset the setting to a default state. This is accompanied by haptic feedback for better UX.

On tvOS, due to the lack of a slider control support in Settings.bundle, a multi-input is provided instead that roughly covers the iOS's slider range.

A Core Data migration and accompanying glue code is provided for persisting the setting change.

Screenshots

iOS

New setting (default value)

TouchpadSensibility_iOS_Default

New setting (changed value)

TouchpadSensibility_iOS_Changed

tvOS

New setting (default value)

TouchpadSensibility_tvOS_SettingsItem

Available options

TouchpadSensibility_tvOS_SettingsItemOptions_1
TouchpadSensibility_tvOS_SettingsItemOptions_2

This commit introduces support on the iOS and tvOS apps for
changing the mouse sensitivity within relative mouse ("Touchpad")
mode. It does this by multiplying the delta movement sent to the
host by a fixed factor which can be configured by the user in Settings.

On iOS, the setting provided is a slider with non-lineal behavior.
While it has a multiplier range of 0.0 to 6.0, the default value
of 1.0 stays in the middle; thus, the left side comprehends a
range of [0.0, 1.0) and the right side uses a different range of
[1.0, 6.0]. The option of having 0x sensibility is explicitely
provided in order to unlock usecases in which locking the mouse
cursor in a fixed place is desired.

In addition to that, the slider has a soft detent on the
default 1.0x setting, which allows to quickly reset the setting
to a default state. This is accompanied by haptic feedback for
better UX.

On tvOS, due to the lack of a slider control support in Settings.bundle,
a multi-input is provided instead that roughly covers the iOS's
slider range.

A Core Data migration and accompanying glue code is provided for
persisting the setting change.
@Nnubes256 Nnubes256 changed the title Add support for changing the sensitivity of relative mouse mode. Add support for changing the sensitivity of relative mouse mode Jun 8, 2023
@whitingj
Copy link

This is awesome work and just what I was looking for. Using trackpad mode on an iPad is not a pleasant experience. The mouse moves way too slow.

@cgutman Sorry to ping you but is there any chance you could review this PR and merge?

I took a look at the code and the changes to RelativeTouchHandler.m are minimal and exactly what I would expect, which is basically deltaX * sensitivityMultiplier. All the other changes are just to update the UI with the setting and storing that setting in the data model. IMO the code looks good.

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.

[Feature Request] Cursor Sensitivity
2 participants