Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Key Events Tutorial #3988

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update Key Events Tutorial #3988

wants to merge 2 commits into from

Conversation

findusl
Copy link

@findusl findusl commented Nov 28, 2023


## TextFields

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heya! From your addition, it's not quite clear why users should care about this. From our private convo, you said this is relevant if you have keyboard shortcuts that shouldn't trigger while you're currently in a text field. Would you be able to provide a short code snippet that demonstrates that use case? That would also make it easier for my colleagues to see if what you're doing is idiomatic, and whether we can move forward with adding it to the tutorial. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants