mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-02-10 17:01:00 +01:00
Vibrate on key press
This commit is contained in:
parent
85955e1cc9
commit
8edf021c86
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user