Expansion of vibrate options
Improve location / timing of vibration
Split out vibrate settings for buttons, keyboard, and long actions
Change-Id: I282825cc5f3e44ed6dcabe65dc1f4cb21b407b67
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
index 97a980a..36106c7 100644
--- a/gui/keyboard.cpp
+++ b/gui/keyboard.cpp
@@ -389,7 +389,6 @@
switch (state)
{
case TOUCH_START:
- DataManager::Vibrate("tw_vibrate");
if (GetSelection(x, y) == 0) {
startSelection = -1;
was_held = 0;
@@ -421,7 +420,6 @@
if (highlightRenderCount != 0)
mRendered = false;
highlightRenderCount = 0;
- DataManager::Vibrate("tw_vibrate");
startSelection = 0;
}
break;
@@ -478,6 +476,7 @@
startSelection = 0;
break;
} else if (state == TOUCH_RELEASE && was_held == 0) {
+ DataManager::Vibrate("tw_keyboard_vibrate");
if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].key > 0) {
// Regular key
PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key);
@@ -503,6 +502,7 @@
PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].key);
} else if ((int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey < KEYBOARD_SPECIAL_KEYS && (int)keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey > 0) {
// Long Press Key
+ DataManager::Vibrate("tw_keyboard_vibrate");
PageManager::NotifyKeyboard(keyboard_keys[currentLayout - 1][rowIndex][indexx].longpresskey);
}
} else if (state == TOUCH_REPEAT) {