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

[web] Process keydown and keyup keys for identified keys from virtual keyboard #1380

Merged
merged 7 commits into from
Jun 11, 2024

Conversation

Schahen
Copy link
Collaborator

@Schahen Schahen commented May 30, 2024

This fixes some issues with pressing some virtual keys that don't change the input value - like navigation with arrows.
Also, this will make finally possible to switch to KeybardEvent::key-backed toComposeEvent conversion

@Schahen Schahen requested a review from eymar May 30, 2024 15:18
@Schahen Schahen self-assigned this May 30, 2024
Copy link
Collaborator

@eymar eymar left a comment

Choose a reason for hiding this comment

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

I'm thinking about a test which can be added here:

  • the test would send a touch event to make our internal state (keyboardModeState) switch to KeyboardModeState.Virtual (a tap on the TextField)
  • it would send Keyboard events into the textarea
  • it would check that Modifier.onKeyEvent receives the events

What do you think?

@Schahen Schahen force-pushed the shagen/physical-keys-in-virtual-keyboard branch from d209826 to 531339c Compare June 7, 2024 15:53
@@ -52,7 +52,7 @@ class SelectionContainerTests : OnCanvasTests {
fun setup() {
// Because AfterTest is fixed only in kotlin 2.0
// https://youtrack.jetbrains.com/issue/KT-61888
document.getElementById(canvasId)?.remove()
commonAfterTest()
Copy link
Collaborator

Choose a reason for hiding this comment

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

The tests here failed on CI.
Could this change be a reason of the test failure?

Copy link
Collaborator

Choose a reason for hiding this comment

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

although locally all the tests pass. weird :(

Copy link
Collaborator

Choose a reason for hiding this comment

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

Tried to rerun the CI, but same failure.

for some reason I think commonAfterTest might be a reason.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let me just return everything as it was and see how it goes
the reason might be parallelization or whatever

@Schahen Schahen merged commit e90c98a into jb-main Jun 11, 2024
6 of 8 checks passed
@Schahen Schahen deleted the shagen/physical-keys-in-virtual-keyboard branch June 11, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants