1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-10 17:08:39 +00:00

upd roadmap

This commit is contained in:
Toxblh 2018-04-09 23:00:39 +01:00
parent 435439ecd2
commit 4a84532c56
2 changed files with 17 additions and 16 deletions

View File

@ -12,44 +12,45 @@ class HapticFeedback {
private var actuatorRef: CFTypeRef? private var actuatorRef: CFTypeRef?
private var deviceID: UInt64 = 0x200000001000000 private var deviceID: UInt64 = 0x200000001000000
private var error: IOReturn = 0 private var error: IOReturn = 0
// Don't know how to do strong is enum one of // Don't know how to do strong is enum one of
// 1 like backClick // 1 like back Click
// 2 (like Click) // 2 like Click
// 3 (week) // 3 week
// 4 (medium) // 4 medium
// 5 (week medium) // 5 week medium
// 6 (strong) // 6 strong
// 15 (nothing) // 15 nothing
// 16 (nothing) // 16 nothing
// you can get a plist `otool -s __TEXT __tpad_act_plist /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport|tail -n +3|awk -F'\t' '{print $2}'|xxd -r -p`
func tap(strong:Int32) -> Void { func tap(strong:Int32) -> Void {
let actuatorRef = MTActuatorCreateFromDeviceID(deviceID).takeRetainedValue() let actuatorRef = MTActuatorCreateFromDeviceID(deviceID).takeRetainedValue()
// TODO: Need to fix warning // TODO: Need to fix warning
guard actuatorRef != nil else { guard actuatorRef != nil else {
print("guard actuatorRef == nil") print("guard actuatorRef == nil")
return return
} }
error = MTActuatorOpen(actuatorRef) error = MTActuatorOpen(actuatorRef)
guard error == kIOReturnSuccess else { guard error == kIOReturnSuccess else {
print("guard MTActuatorOpen") print("guard MTActuatorOpen")
return return
} }
error = MTActuatorActuate(actuatorRef, strong, 0, 0.0, 0.0) error = MTActuatorActuate(actuatorRef, strong, 0, 0.0, 0.0)
guard error == kIOReturnSuccess else { guard error == kIOReturnSuccess else {
print("guard MTActuatorActuate") print("guard MTActuatorActuate")
return return
} }
error = MTActuatorClose(actuatorRef) error = MTActuatorClose(actuatorRef)
guard error == kIOReturnSuccess else { guard error == kIOReturnSuccess else {
print("guard MTActuatorClose") print("guard MTActuatorClose")
return return
} }
return return
} }
} }

View File

@ -17,7 +17,7 @@ My the idea is to create the program like a platform for plugins for customizati
- [x] Time in touchbar! - [x] Time in touchbar!
- [x] First the weather plugin - [x] First the weather plugin
- [x] Find how to open full-screen TouchBar without the cross and stripe menu - [x] Find how to open full-screen TouchBar without the cross and stripe menu
- [ ] Find how to add haptic feedback - [x] Find how to add haptic feedback
- [ ] JSON or another approch for save preset and plugins maybe in `~/mtmr` - [ ] JSON or another approch for save preset and plugins maybe in `~/mtmr`
- [ ] Layout: [always left, NSSliderView for center, always right] - [ ] Layout: [always left, NSSliderView for center, always right]
- [ ] Custom buttons size, actions by click in settings - [ ] Custom buttons size, actions by click in settings