Skip to content

Instantly share code, notes, and snippets.

@kubeliv
Last active July 1, 2021 14:19
Show Gist options
  • Save kubeliv/117b2dcd7c1c4244ffc835bdd8b40ba6 to your computer and use it in GitHub Desktop.
Save kubeliv/117b2dcd7c1c4244ffc835bdd8b40ba6 to your computer and use it in GitHub Desktop.
Swift script to consistently vibrate the MacBook touchpad - Updated to macOS 10.13
import AppKit
var i = 1;
while i <= 5000 {
NSHapticFeedbackManager.defaultPerformer.perform(NSHapticFeedbackManager.FeedbackPattern.alignment, performanceTime: NSHapticFeedbackManager.PerformanceTime.now);
i = i + 1
usleep(10000000 / 10000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment