diff --git a/tutorials/Keyboard/README.md b/tutorials/Keyboard/README.md index 3e422e811b..36c8a2e4c8 100644 --- a/tutorials/Keyboard/README.md +++ b/tutorials/Keyboard/README.md @@ -171,4 +171,4 @@ fun App() { TextFields in Compose for Desktop consume special events of type `java.awt.event.KeyEvent.KEY_TYPED`. If you want to avoid consuming Events that have already been consumed by a TextField, you have to check for this special eventType, as TextFields will not consume `KeyEventType.KeyDown` or `KeyEventType.KeyUp` events on Desktop. -You can do this using a condition like `keyEvent.isTypedEvent && keyEvent.awtEventOrNull?.keyChar == 'a'` where `isTypedEvent` uses the `actual val KeyEvent.isTypedEvent: Boolean` in `TextFieldKeyInput.desktop.kt`. +In desktop code you can check this using `keyEvent.isTypedEvent` where `isTypedEvent` uses the `actual val KeyEvent.isTypedEvent: Boolean` in `TextFieldKeyInput.desktop.kt`.