Skip to content
A simple utility application to trigger haptic feedback when tapping Touch Bar.
Branch: master
Clone or download
niw Minor updates.
 * Support macOS 10.14 Mojave.
Latest commit a609889 Oct 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
HapticKey.xcodeproj Update scheme for Xcode 9.3. Apr 28, 2018
HapticKey.xcworkspace Add Sparkle. Feb 10, 2018
HapticKey Minor updates. Oct 4, 2018
scripts Add sparkle_appcast. Feb 18, 2018
.gitignore Add Makefile. Feb 10, 2018
Gemfile
Gemfile.lock Update `sparkle_appcast`. Feb 18, 2018
LICENSE Add 2018. Jan 4, 2018
Makefile
Podfile
Podfile.lock Add Sparkle. Feb 10, 2018
README.md Update README. Mar 15, 2018

README.md

HapticKey

HapticKey is a simple utility application for MacBook with Touch Bar that triggers a haptic feedback when tapping Touch Bar.

Since Touch Bar is just a flat panel, there is no feedback other than a visual change of the key displayed, it is terribly uncomfortable especially when tapping ESC key, like while using Vim.

By adding a haptic feedback, which is vibrating a trackpad not Touch Bar itself, it helps to improve the usage of Touch Bar. It is also optionally playing a sound effect or flashing the screen like a visual bell on a terminal.

Usage

Download the latest pre-built application binary from Releases page. Note that these pre-built application binaries are not signed so you need to allow to execute it on Security & Privacy settings pane in System Preferences.

Also, the application may ask a permission to use Accessibility, as like the other applications that are listening system events.

Development

To build the application from the source code, you need to use the latest Xcode 9.

Install dependencies

Use bootstrap make target to install all dependencies from CocoaPods.

make bootstrap

This target uses a wrapper script scripts/pod, which uses system /usr/bin/ruby to create an isolated RubyGems environment under project directory, then install Bundler, install CocoaPods and finally install dependencies.

Once it’s ready, you can open HapticKey.xcworkspace to build the application.

Overviews

This application is using CGEventTap to listen key down and up or tap events on Touch Bar.

It triggers haptic feedbacks by using private APIs in MultitouchSupport.framework when the event meets the conditions.

Currently, the application is listening either ESC and F1, F2, etc. keys or tap events on Touch Bar. You can implement your own HTKEventListener to extend the application to trigger feedbacks on arbitrary events.

You can’t perform that action at this time.