Add support for changing the sensitivity of relative mouse mode #563
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)
New setting (changed value)
tvOS
New setting (default value)
Available options