Add configurable flick gesture sensitivity setting - #2201
Open
rishubil wants to merge 1 commit into
Open
Conversation
Add a "Flick sensitivity" slider to the "Long-Press Keys & Spacebar" settings menu, next to the long press duration slider, that lets users adjust how far they have to swipe before a flick action triggers. The threshold is expressed as a percentage of the key width and is adjustable from 1% to 100%, with -1 selecting the built-in default of one third of the key width. - Add flickThresholdSetting, storing the threshold as an int percentage - Replace the hardcoded width/3 threshold in Key with a configurable Key.flickThresholdRatio companion property - Load the initial value and observe changes in LatinIME The slider mirrors the existing vibration strength setting: the stored unit matches the slider range, values are quantised on write, and the -1 sentinel renders as "Default".
|
Please sign our contributor license agreement at https://cla.futo.tech |
|
Please sign our contributor license agreement at https://cla.futo.tech |
Author
|
I've signed the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The flick gesture threshold is currently hardcoded to one third of the key width in
Key.flickDirection. On flick layouts with small keys, or for users who prefer shorter gestures, that distance is farther than comfortable, and there is no way to adjust it.This adds a "Flick sensitivity" slider so the threshold can be tuned, while keeping the current behavior as the default.
Changes
-1selecting the built-in default of one third.width / 3threshold inKeywith a configurableKey.flickThresholdRatiocompanion property.LatinIME.The slider follows the existing "Vibration" setting: the stored unit matches the slider range, values are quantized on write so the indicator always matches what is stored, and the
-1sentinel renders as "Default".Notes