Skip to content

Commit

Permalink
Fixes toggleKeySelection issue with control and meta keys pressed.
Browse files Browse the repository at this point in the history
  • Loading branch information
fscarponi committed Oct 30, 2023
1 parent 34c554a commit 120bca5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.ui.input.key.key
import androidx.compose.ui.input.key.type
import androidx.compose.ui.input.pointer.PointerEvent
import androidx.compose.ui.input.pointer.isCtrlPressed
import androidx.compose.ui.input.pointer.isMetaPressed
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -53,7 +54,7 @@ interface PointerEventActions {
onExtendSelectionToKey(key, allKeys, selectableLazyListState, selectionMode)
}

pointerEvent.keyboardModifiers.isCtrlPressed -> {
pointerEvent.keyboardModifiers.isCtrlPressed || pointerEvent.keyboardModifiers.isMetaPressed -> {
Log.i("ctrl pressed on click")
toggleKeySelection(key, allKeys, selectableLazyListState)
}
Expand Down

0 comments on commit 120bca5

Please sign in to comment.