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

Triggering of haptic and audio feedback during cursor movement on spacebar swipe #1035

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ZiemlichUndead
Copy link

I added a line that triggers the default haptic and audio feedback when the cursor is getting moved by swiping over the spacebar.
If keypress sound is enabled the sound might get spammed a bit.

The implementation works well for me like this but I didnt fully understand the method I modified so maybe this doesnt make sense in every case.

Issue 381 also requested this.

@codokie
Copy link
Contributor

codokie commented Aug 9, 2024

The default haptic feedback may not be ideal for this purpose, it uses the constant KEYBOARD_TAP which has medium intensity.
I would suggest using subtle haptic constants that are designed for virtual haptic textures like TEXT_HANDLE_MOVE.
Also there doesn't seem to be a reason this should trigger audio feedback.

Added methods to customize for cursor haptic feedback using TEXT_HANDLE_MOVE and CLOCK_TICK (API <27)
@ZiemlichUndead
Copy link
Author

I have now added methods to make the call using TEXT_HANDLE_MOVE and remove audiofeedback.
TEXT_HANDLE_MOVE isnt available in API <27 so I used CLOCK_TICK in that case which seemed similar to me.

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