Skip to content

[Windows] Key event processing hung after typing character using AltGr #78005

Closed
flutter-team-archive/engine
#27921

Description

Hi,
In the demo application Flutter Folio for desktop (https://flutter.gskinner.com/#g-download) there is a serious problem, to enter the login in the application I had to type the character @, when it is pressed @ you can no longer continue typing, the problem is that it interferes in all windows and no longer you can type in any of the windows apps, only the ENTER key works ...
Pressing characters in Notepad causes a line break.
You need to restart your computer for the keyboard to work properly again.
Spanish keyboard.
Windows 10 20H2
Check out the following video: https://recordit.co/pQTePNDduz
Regards,
Jose

Activity

  1. iapicca commented on Mar 12, 2021

    @iapicca

    @Josua2012
    this issue should probably be addressed in flutter-folio' s repo
    if you believe the issue is caused by flutter please provide your flutter doctor -v, your flutter run -v
    and a minimal reproducible code sample

  2. darshankawar commented on Mar 12, 2021

    @darshankawar
    Member

    @Josua2012
    Tried your code sample on Windows 10 desktop with spanish keyboard enabled and typed @, but didn't see the crash.

    Screenshot 2021-03-12 at 5 41 51 PM

    Screenshot 2021-03-12 at 5 42 04 PM

    IMG-0693

    What spanish keyboard settings do you have ? I select the espanyol keyboard, not sure if any other setting is required ?

    Also provide your flutter doctor -v.

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 12, 2021
  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Mar 12, 2021
  5. darshankawar commented on Mar 16, 2021

    @darshankawar
    Member

    Keeping this issue open for further investigation.

  6. added
    platform-windowsBuilding on or for Windows specifically
    a: internationalizationSupporting other languages or locales. (aka i18n)
    a: text inputEntering text in a text field or keyboard related problems
    engineflutter/engine related. See also e: labels.
    and removed
    in triagePresently being triaged by the triage team
    on Mar 16, 2021
  7. 49 remaining items

  8. dkwingsmt commented on Jul 13, 2021

    @dkwingsmt
    Contributor

    We still have problems with the same buttons, unfortunately.

    Problem 1 - (AltGr Button): I typed "[email protected]" on the login form, and what I got is "johndoe@@GGMMAAIILL..ccoomm". Once I press the "AltGr" button, it starts to type every character twice. To fix it, I need to press the AltGr button again.

    Problem 2 - (Left Ctrl Button): Same here, once I press the left Ctrl button, it starts to type every character twice. To fix it, I need to press LCtrl button again.

    My Flutter doctor logs:

    Flutter (Channel master, 2.4.0-1.0.pre.208, on Microsoft Windows [Version 10.0.19042.1083], locale en-US)

    • Flutter version 2.4.0-1.0.pre.208 at C:\src\flutter
    
    • Upstream repository https://github.com/flutter/flutter.git
    
    • Framework revision d2057d50c4 (74 minutes ago), 2021-07-13 11:01:03 -0700
    
    • Engine revision 07d04041d5
    
    • Dart version 2.14.0 (build 2.14.0-301.0.dev)
    

    For your information.

    Thanks for your helps in advance.

    Thanks for the report. I don't think I've seen this issue when I was testing (I just use a text field), so can you provide a minimal example?

  9. MarcoGolin commented on Jul 13, 2021

    @MarcoGolin

    ════════ Exception caught by services library ══════════════════════════════════
    The following assertion was thrown during a platform message callback:
    Attempted to send a key down event when no keys are in keysPressed. This state can occur if the key event being sent doesn't properly set its modifier flags. This was the event: RawKeyDownEvent#80cf2(logicalKey: LogicalKeyboardKey#00037(keyId: "0x50000000037", keyLabel: "Numpad 7", debugName: "Numpad 7"), physicalKey: PhysicalKeyboardKey#700e2(usbHidUsage: "0x000700e2", debugName: "Alt Left")) and its data: Instance of 'RawKeyEventDataWindows'
    'package:flutter/src/services/raw_keyboard.dart':
    Failed assertion: line 666 pos 7: 'event is! RawKeyDownEvent || _keysPressed.isNotEmpty'

    [√] Flutter (Channel master, 2.4.0-1.0.pre.212, on Microsoft Windows [Versión 10.0.19042.1083], locale es-PY)
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    X cmdline-tools component is missing
    Run path/to/sdkmanager --install "cmdline-tools;latest"
    See https://developer.android.com/studio/command-line for more details.
    [√] Chrome - develop for the web
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.5)
    [√] Android Studio (version 4.1.0)
    [√] VS Code (version 1.58.1)
    [√] Connected device (3 available)

    the ERROR PERSIST

  10. dkwingsmt commented on Jul 13, 2021

    @dkwingsmt
    Contributor

    @MarcoGolin I believe that is a different issue. Can you file a new issue to describe this bug, including how to reproduce?

  11. imariman commented on Jul 13, 2021

    @imariman

    @dkwingsmt You can find the example code here ( https://github.com/imariman/login_form_bug_example ). Once you press either AltGr or LCtrl buttons, you can easily see the problem.

    Hope this helps,
    Thanks.

  12. imariman commented on Aug 11, 2021

    @imariman

    AltGr + Q combination still has some problems. :) Once I try to type "[email protected]", it types double "@" like "johndoe@@gmail.com". @dkwingsmt

    For your information.
    Thanks for your helps in advance.

    [√] Flutter (Channel master, 2.5.0-6.0.pre.57, on Microsoft Windows [Version 10.0.19042.1110], locale en-US)

  13. dkwingsmt commented on Aug 11, 2021

    @dkwingsmt
    Contributor

    @imariman The engine hasn't been rolled into Flutter yet. Can you check back again in a few hours?

  14. added
    r: fixedIssue is closed as already fixed in a newer version
    on Aug 12, 2021
  15. imariman commented on Aug 12, 2021

    @imariman

    It works correctly now, thank you.

  16. valmorflores commented on Aug 17, 2021

    @valmorflores

    Problem in Linux. Altgr + @ sequenced by Ctrl (left)+@

    image

    ════════ Exception caught by services library ══════════════════════════════════
    A KeyUpEvent is dispatched, but the state shows that the physical key is pressed on a different logical key. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in HardwareKeyboard. This was the event: KeyUpEvent#34b0b(physicalKey: PhysicalKeyboardKey#7001f(usbHidUsage: "0x0007001f", debugName: "Digit 2"), logicalKey: LogicalKeyboardKey#00032(keyId: "0x00000032", keyLabel: "2", debugName: "Digit 2"), character: null, timeStamp: 26:51:57.783000) and the recorded logical key LogicalKeyboardKey#00040(keyId: "0x00000040", keyLabel: "@", debugName: "At")
    'package:flutter/src/services/hardware_keyboard.dart':
    Failed assertion: line 444 pos 16: '_pressedKeys[event.physicalKey] == event.logicalKey'

    ==========

    flutter doctor -v
    [✓] Flutter (Channel master, 2.5.0-7.0.pre.105, on Linux Mint 19.2 4.15.0-153-generic,
    locale pt_BR.UTF-8)
    • Flutter version 2.5.0-7.0.pre.105 at /home/valmor/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a2e33de (9 hours ago), 2021-08-16 22:51:16 -0700
    • Engine revision 7dc8eba
    • Dart version 2.15.0 (build 2.15.0-15.0.dev)

    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /home/valmor/Android/Sdk
    • Platform android-30, build-tools 29.0.3
    • ANDROID_HOME = /home/valmor/Android/Sdk
    • Java binary at: /usr/lib/jvm/java-8-openjdk-amd64/bin/java
    • Java version OpenJDK Runtime Environment (build
    1.8.0_292-8u292-b10-0ubuntu1~18.04-b10)
    • All Android licenses accepted.

    [✓] Chrome - develop for the web
    • Chrome at google-chrome

    [✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

    [!] Android Studio (not installed)
    • Android Studio not found; download from
    https://developer.android.com/studio/index.html
    (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for
    detailed instructions).

    [✓] VS Code (version 1.59.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.25.0

    [✓] Connected device (2 available)
    • Linux (desktop) • linux • linux-x64 • Linux Mint 19.2 4.15.0-153-generic
    • Chrome (web) • chrome • web-javascript • Google Chrome 92.0.4515.131

    ! Doctor found issues in 1 category.

  17. dkwingsmt commented on Aug 17, 2021

    @dkwingsmt
    Contributor

    @valmorflores Thank you, can you open a separate new issue so that it's easier to track?

  18. C4s4r commented on Aug 26, 2021

    @C4s4r

    It works correctly now, thank you.

    Is the flutter-team-archive/engine#27921 PR on the stable branch or only on the master branch?
    I was checking this with the 2.2.3 stable branch but still encountering this behaviour.

  19. darshankawar commented on Aug 27, 2021

    @darshankawar
    Member

    @C4s4r
    Currently it seem to be available on master. Once the new stable version releases, you'll see this fix in it.

  20. github-actions commented on Sep 10, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work lista: desktopRunning on desktopa: internationalizationSupporting other languages or locales. (aka i18n)a: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.platform-windowsBuilding on or for Windows specificallyr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions