diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2019-03-13 00:28:31 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2019-03-18 04:39:00 +0100 |
commit | 3ed778ad6389c901077fee38bb77abd55dd4eba4 (patch) | |
tree | 57a2a9af729ca594387f71532797fb9d42bcc8cc /gui/keyboard.cpp | |
parent | fix building TWRP for devices without cache (diff) | |
download | android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.gz android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.bz2 android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.lz android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.xz android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.tar.zst android_bootable_recovery-3ed778ad6389c901077fee38bb77abd55dd4eba4.zip |
Diffstat (limited to 'gui/keyboard.cpp')
-rwxr-xr-x[-rw-r--r--] | gui/keyboard.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp index ca7006dc3..b6a772b01 100644..100755 --- a/gui/keyboard.cpp +++ b/gui/keyboard.cpp @@ -549,7 +549,11 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) bool repeatKey = false; Layout& lay = layouts[currentLayout - 1]; if (state == TOUCH_RELEASE && was_held == 0) { + +#ifndef TW_NO_HAPTICS DataManager::Vibrate("tw_keyboard_vibrate"); +#endif + if (key.layout > 0) { // Switch layouts if (lay.is_caps && key.layout == lay.revert_layout && !CapsLockOn) { @@ -593,7 +597,11 @@ int GUIKeyboard::NotifyTouch(TOUCH_STATE state, int x, int y) was_held = 1; if (key.longpresskey > 0) { // Long Press Key + +#ifndef TW_NO_HAPTICS DataManager::Vibrate("tw_keyboard_vibrate"); +#endif + PageManager::NotifyCharInput(key.longpresskey); } else |