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

Trigger feedback while dragging sliders (volume, brightness, etc) #4

Open
chrisballinger opened this issue Jan 15, 2018 · 7 comments
Open

Comments

@chrisballinger
Copy link

Similar to how the taptic engine on iOS gives you rapid feedback when scrolling through picker values, or jumping through tableview indexes, it would be nice if there was velocity-relative feedback when changing sliders values in the touchbar, for example volume and brightness. I guess just having a set number of clicks per length of slider and triggering events as you pass through them would work pretty well.

This project is great by the way, I had an idea to do this a while ago, so it was a good surprise today to see that it's possible! I'm really confused as to why Apple didn't include some sort of haptic feedback unit in the touchbar from the initial iteration. It probably would have made heavy vim users a little less upset with the removal of the hardware esc key. :)

@niw
Copy link
Owner

niw commented Jan 15, 2018

It may be possible, but need to figure out how to listen events triggered by each UI component displayed on the Touch Bar, which I didn’t investigate yet so it may not be easy to implement soon.
At this moment, it’s possible to know the tracking finger on it but it doesn’t mean that the events are for slider UI component and if using it, it may triggering unnecessary haptic feedbacks.

@chrisballinger
Copy link
Author

I just had another idea, but to avoid opening up too many "idea issues" on your repo, I'll just include it here because it's still relevant to this one. I just had a rush of nostalgia thinking about how you could add the OS 9 Platinum sounds in addition or as an alternative to the haptic feedback. For example, while you're interacting with a touchbar slider, you could play the OS 9 "dragging a window" sound.

@niw
Copy link
Owner

niw commented Jan 19, 2018

I think it’s reasonable request that to add a feature to play sound feedback instead of, or along with a haptic feedback.

@muescha
Copy link

muescha commented Jan 29, 2018

the hight of the sound could reflect the position of the slider

@niw niw changed the title [Feature Request] Feedback while dragging sliders (volume, brightness, etc) Trigger feedback while dragging sliders (volume, brightness, etc) Jan 30, 2018
@jdtzmn
Copy link

jdtzmn commented Jul 15, 2018

@chrisballinger I added haptic feedback when dragging on the touchbar (see pull request above), however I will keep searching for a way to target sliders/scrubbers only.

@jdtzmn
Copy link

jdtzmn commented Jul 15, 2018

@niw tbh, I've never written Objective-C code before, so feel free to make edits/adjustments if something is not written the "correct" way.

@niw
Copy link
Owner

niw commented Jul 15, 2018

@jdtzmn Thank you so much! I think using NSTouchPhaseMoved is valid and simple enough solution for this. If you could find the slider, scrubber only solution, that would be also nice! I’ll see and test that patch soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants