HapticKey
HapticKey copied to clipboard
Trigger feedback while dragging sliders (volume, brightness, etc)
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. :)
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.
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.
I think it’s reasonable request that to add a feature to play sound feedback instead of, or along with a haptic feedback.
the hight of the sound could reflect the position of the slider
@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.
@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.
@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.