Support numpad enter

This commit is contained in:
Syer10
2022-11-17 19:46:25 -05:00
parent 3b42702464
commit 40fb2e20a9

View File

@@ -24,7 +24,7 @@ fun Modifier.keyboardHandler(
val focusManager = LocalFocusManager.current
Modifier.onPreviewKeyEvent {
if (it.type == KeyEventType.KeyDown) {
if (singleLine && it.key == Key.Enter) {
if (singleLine && (it.key == Key.Enter || it.key == Key.NumPadEnter)) {
enterAction?.invoke(focusManager) ?: action(focusManager)
true
} else if (it.key == Key.Tab) {