Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niw/haptickey
A simple utility application to trigger haptic feedback when tapping Touch Bar.
https://github.com/niw/haptickey
macos objective-c touchbar
Last synced: 30 days ago
JSON representation
A simple utility application to trigger haptic feedback when tapping Touch Bar.
- Host: GitHub
- URL: https://github.com/niw/haptickey
- Owner: niw
- License: mit
- Created: 2017-12-04T08:39:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-16T18:52:00.000Z (6 months ago)
- Last Synced: 2024-10-14T15:21:37.538Z (30 days ago)
- Topics: macos, objective-c, touchbar
- Language: Objective-C
- Homepage:
- Size: 6.34 MB
- Stars: 1,648
- Watchers: 33
- Forks: 62
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HapticKey
=========HapticKey is a simple utility application for MacBook with Touch Bar that triggers a haptic feedback when tapping Touch Bar.
![HapticKey](Resources/HapticKey.png)
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](https://github.com/niw/HapticKey/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.
Build
-----To build the application from the source code, you need to use the latest version of Xcode.
Simply use `make` to install all dependencies, build application binary, then archive it in `build/HapticKey.xcarchive/Products/`.
$ make
Development
-----------You can simply open `HapticKey.xcodeproj` to start development of 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.