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

[Keyboard] Enable special CapsLock handling and key guarding for Web on iOS #37972

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Nov 30, 2022

The macOS system has some different rules for keyboard:

  1. macOS considers CapsLock key down event "enabling the lock", while CapsLock up "disabling the lock" - instead of the usual "pressing/releasing the key".
  2. Command-LetterKey does not have a key up event.

Web on macOS already has special rules to handle them.

However, we recently realized that iOS has the same rules. This PR applies these rules to Web on iOS as well.

This PR also fixes a test that incorrectly uses OperatingSystem.linux to test key guarding.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Nov 30, 2022
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

Modulo the suggestion about using a ValueVariant in the test.

lib/web_ui/test/keyboard_converter_test.dart Show resolved Hide resolved
@dkwingsmt dkwingsmt added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 30, 2022
@auto-submit auto-submit bot merged commit a620595 into flutter:main Nov 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 30, 2022
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 1, 2022
…116310)

* a62059556 Impl and test (flutter/engine#37972)

* 99b000e1e Roll buildroot to prevent excessive dirtying on Xcode 14 (flutter/engine#37991)
mit-mit pushed a commit to mit-mit/flutter that referenced this pull request Dec 6, 2022
…lutter#116310)

* a62059556 Impl and test (flutter/engine#37972)

* 99b000e1e Roll buildroot to prevent excessive dirtying on Xcode 14 (flutter/engine#37991)
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…lutter#116310)

* a62059556 Impl and test (flutter/engine#37972)

* 99b000e1e Roll buildroot to prevent excessive dirtying on Xcode 14 (flutter/engine#37991)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…lutter#116310)

* a62059556 Impl and test (flutter/engine#37972)

* 99b000e1e Roll buildroot to prevent excessive dirtying on Xcode 14 (flutter/engine#37991)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine
Projects
None yet
2 participants