Vibrate on key press

This commit is contained in:
Naveen 2022-07-31 15:00:00 +05:30
parent 85955e1cc9
commit 8edf021c86
1 changed files with 2 additions and 0 deletions

View File

@ -1401,6 +1401,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
emoji_palette_mode_change.apply { emoji_palette_mode_change.apply {
setTextColor(bottomTextColor) setTextColor(bottomTextColor)
setOnClickListener { setOnClickListener {
vibrateIfNeeded()
closeEmojiPalette() closeEmojiPalette()
} }
} }
@ -1412,6 +1413,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
isPressed = true isPressed = true
mRepeatKeyIndex = mKeys.indexOfFirst { it.code == KEYCODE_DELETE } mRepeatKeyIndex = mKeys.indexOfFirst { it.code == KEYCODE_DELETE }
mCurrentKey = mRepeatKeyIndex mCurrentKey = mRepeatKeyIndex
vibrateIfNeeded()
mOnKeyboardActionListener!!.onKey(KEYCODE_DELETE) mOnKeyboardActionListener!!.onKey(KEYCODE_DELETE)
// setup repeating backspace // setup repeating backspace
val msg = mHandler!!.obtainMessage(MSG_REPEAT) val msg = mHandler!!.obtainMessage(MSG_REPEAT)