mirror of
https://github.com/Toxblh/MTMR.git
synced 2026-01-10 00:58:37 +00:00
upd roadmap
This commit is contained in:
parent
435439ecd2
commit
4a84532c56
@ -12,44 +12,45 @@ class HapticFeedback {
|
||||
private var actuatorRef: CFTypeRef?
|
||||
private var deviceID: UInt64 = 0x200000001000000
|
||||
private var error: IOReturn = 0
|
||||
|
||||
|
||||
// Don't know how to do strong is enum one of
|
||||
// 1 like backClick
|
||||
// 2 (like Click)
|
||||
// 3 (week)
|
||||
// 4 (medium)
|
||||
// 5 (week medium)
|
||||
// 6 (strong)
|
||||
// 15 (nothing)
|
||||
// 16 (nothing)
|
||||
|
||||
// 1 like back Click
|
||||
// 2 like Click
|
||||
// 3 week
|
||||
// 4 medium
|
||||
// 5 week medium
|
||||
// 6 strong
|
||||
// 15 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 {
|
||||
let actuatorRef = MTActuatorCreateFromDeviceID(deviceID).takeRetainedValue()
|
||||
|
||||
|
||||
// TODO: Need to fix warning
|
||||
guard actuatorRef != nil else {
|
||||
print("guard actuatorRef == nil")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
error = MTActuatorOpen(actuatorRef)
|
||||
guard error == kIOReturnSuccess else {
|
||||
print("guard MTActuatorOpen")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
error = MTActuatorActuate(actuatorRef, strong, 0, 0.0, 0.0)
|
||||
guard error == kIOReturnSuccess else {
|
||||
print("guard MTActuatorActuate")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
error = MTActuatorClose(actuatorRef)
|
||||
guard error == kIOReturnSuccess else {
|
||||
print("guard MTActuatorClose")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,7 +17,7 @@ My the idea is to create the program like a platform for plugins for customizati
|
||||
- [x] Time in touchbar!
|
||||
- [x] First the weather plugin
|
||||
- [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`
|
||||
- [ ] Layout: [always left, NSSliderView for center, always right]
|
||||
- [ ] Custom buttons size, actions by click in settings
|
||||
|
||||
Loading…
Reference in New Issue
Block a user