summaryrefslogtreecommitdiffstats
path: root/HapticKeyboard/Tweak.x
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-08-08 16:37:36 -0400
committerCameron Katri <me@cameronkatri.com>2021-08-08 16:37:36 -0400
commit027b91b5542974670fc4186a717634d347c98df2 (patch)
tree0c065a054a3400e35402ed6fcddf2e6c26d78384 /HapticKeyboard/Tweak.x
parentc014bf2300cc36b313a05745cc3f286dc906a813 (diff)
downloadtweaks-027b91b5542974670fc4186a717634d347c98df2.tar.gz
tweaks-027b91b5542974670fc4186a717634d347c98df2.tar.zst
tweaks-027b91b5542974670fc4186a717634d347c98df2.zip
Add HapticKeyboard
Diffstat (limited to 'HapticKeyboard/Tweak.x')
-rw-r--r--HapticKeyboard/Tweak.x17
1 files changed, 17 insertions, 0 deletions
diff --git a/HapticKeyboard/Tweak.x b/HapticKeyboard/Tweak.x
new file mode 100644
index 0000000..847cb80
--- /dev/null
+++ b/HapticKeyboard/Tweak.x
@@ -0,0 +1,17 @@
+@interface UIKeyboardLayoutStar : UIView
+@property (nonatomic, retain) UIImpactFeedbackGenerator *feedback;
+@end
+
+%hook UIKeyboardLayoutStar
+%property (nonatomic, retain) UIImpactFeedbackGenerator *feedback;
+
+-(void)touchDownWithKey:(id)arg1 withTouchInfo:(id)arg2 atPoint:(CGPoint)arg3 executionContext:(id)arg4
+{
+ %orig;
+ if (!self.feedback)
+ self.feedback = UIImpactFeedbackGenerator.alloc.init;
+ [self.feedback prepare];
+ [self.feedback impactOccurred];
+}
+
+%end