Skip to content

Commit

Permalink
Fixing some cursor update issues for multitap. #242
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Jan 25, 2024
1 parent 00befa4 commit a592f7e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.dessalines.thumbkey.ui.components.keyboard
import android.content.Context
import android.media.AudioManager
import android.util.Log
import android.view.inputmethod.InputConnection.CURSOR_UPDATE_FILTER_INSERTION_MARKER
import android.view.inputmethod.InputConnection.CURSOR_UPDATE_MONITOR
import androidx.compose.foundation.background
import androidx.compose.foundation.border
Expand Down Expand Up @@ -302,7 +301,11 @@ fun KeyboardScreen(
}
}
} else {
if (ctx.currentInputConnection.requestCursorUpdates(CURSOR_UPDATE_MONITOR or CURSOR_UPDATE_FILTER_INSERTION_MARKER)) {
// NOTE, this should use or CURSOR_UPDATE_FILTER_INSERTION_MARKER , but it doesn't work on
// non-compose textfields.
// This also requires jetpack compose >= 1.6
// See https://github.com/dessalines/thumb-key/issues/242
if (ctx.currentInputConnection.requestCursorUpdates(CURSOR_UPDATE_MONITOR)) {
Log.d(TAG, "request for cursor updates succeeded, cursor updates will be provided")
} else {
Log.d(TAG, "request for cursor updates failed, cursor updates will not be provided")
Expand Down

0 comments on commit a592f7e

Please sign in to comment.