Fix long press magikeyboard

This commit is contained in:
J-Jamet committed 2019-07-31 14:54:20 +02:00
1 parent eb2040edbd
commit b507fa2a09
1 file changed
+4 -5
@@ -20,13 +20,12 @@ class MagikeyboardView : KeyboardView {
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes)
override fun onLongPress(key: Keyboard.Key): Boolean {
// TODO Action on long press
if (key.codes[0] == KEY_BACK_KEYBOARD) {
onKeyboardActionListener.onKey(KEY_CHANGE_KEYBOARD, null)
return true
return if (key.codes[0] == KEY_BACK_KEYBOARD) {
onKeyboardActionListener.onKey(KEY_CHANGE_KEYBOARD, IntArray(0))
true
} else {
//Log.d("LatinKeyboardView", "KEY: " + key.codes[0]);
return super.onLongPress(key)
super.onLongPress(key)
}
}
}