Skip to content

Wrong KeyId for digits on Windows with LogicalKeyboardKey. #75270

Closed

Description

@gaetschwartz

Steps to Reproduce

  1. Run this project on Windows Desktop : https://gist.github.com/gaetschwartz/7cf05a7907a1de9a4c28395a264e0897
  2. Press a digit on your keyboard. Notice that the keyId seems to be added to 0x10700000000 when released.
Key Expected code Actual code
Digit1 0x31 0x10700000031
Digit2 0x32 0x10700000032
Digit3 0x33 0x10700000033
Logs
[√] Flutter (Channel dev, 1.26.0-17.1.pre, on Microsoft Windows [Version 10.0.19042.746], locale en-US)
    • Flutter version 1.26.0-17.1.pre at C:\Users\Gaetan\Developer\src\flutter
    • Framework revision c40e5294dd (4 days ago), 2021-01-29 08:44:18 -0800
    • Engine revision 5d3477eab4
    • Dart version 2.12.0 (build 2.12.0-259.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\Gaetan\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.4)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.8.30907.101
    • Windows 10 SDK version 10.0.18362.0

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[√] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19042.746]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 88.0.4324.104
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 88.0.705.50

• No issues found!
Analyzing flutter_application_3...                                      
No issues found! (ran in 1.9s)
[  +60 ms] executing: [C:\Users\Gaetan\Developer\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +55 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] c40e5294dda34d04cd222dfdf765f171e12e4a8d
[        ] executing: [C:\Users\Gaetan\Developer\src\flutter/] git tag --points-at c40e5294dda34d04cd222dfdf765f171e12e4a8d
[  +51 ms] Exit code 0 from: git tag --points-at c40e5294dda34d04cd222dfdf765f171e12e4a8d
[        ] 1.26.0-17.1.pre
[  +31 ms] executing: [C:\Users\Gaetan\Developer\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +35 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/dev
[        ] executing: [C:\Users\Gaetan\Developer\src\flutter/] git ls-remote --get-url origin
[  +33 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +58 ms] executing: [C:\Users\Gaetan\Developer\src\flutter/] git rev-parse --abbrev-ref HEAD
[  +33 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] dev
[  +70 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[  +15 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[  +18 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +6 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +7 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +55 ms] executing: C:\Users\Gaetan\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +34 ms] List of devices attached
[   +4 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +5 ms] Downloading Web SDK...
[ +290 ms] Content https://storage.googleapis.com/flutter_infra/flutter/5d3477eab415fbcc3d58624b07f0a768f8208f98/flutter-web-sdk-windows-x64.zip md5 hash: lFj6OMDddFHNFFVhbP7aQg==  
[+2705 ms] Downloading Web SDK... (completed in 2,986ms)
[+2943 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +56 ms] Multiple devices found:
[  +17 ms] Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19042.746]
[        ] Chrome (web)      • chrome  • web-javascript • Google Chrome 88.0.4324.104
[        ] Edge (web)        • edge    • web-javascript • Microsoft Edge 88.0.705.50
[        ] [1]: Windows (windows)
[        ] [2]: Chrome (chrome)
[        ] [3]: Edge (edge)
[   +1 ms] Please choose one (To quit, press "q/Q")
[        ] :
[+105570 ms] 1
[   +9 ms] Skipping pub get: version match.
[  +91 ms] Generating C:\Users\Gaetan\Developer\Projects\flutter_application_3\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +61 ms] Initializing file store
[   +8 ms] Skipping target: gen_localizations
[   +8 ms] complete
[   +2 ms] Launching lib\main.dart on Windows in debug mode...
[   +3 ms] C:\Users\Gaetan\Developer\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Users\Gaetan\Developer\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Users\Gaetan\Developer\src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names
--experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\Gaetan\AppData\Local\Temp\flutter_tools.555bdf95\flutter_tool.4cf7b720\app.dill --packages  
C:\Users\Gaetan\Developer\Projects\flutter_application_3\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation     
--filesystem-scheme org-dartlang-root --initialize-from-dill build\c075001b96339384a97db4862b8ab8db.cache.dill.track.dill
[  +31 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires
Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[  +30 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -products * -utf8 -latest -version 16 -requires
Microsoft.VisualStudio.Workload.NativeDesktop Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.VC.CMake.Project
[        ] [
             {
               "instanceId": "ddb775c4",
               "installDate": "2020-11-02T08:35:49Z",
               "installationName": "VisualStudio/16.8.4+30907.101",
               "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community",
               "installationVersion": "16.8.30907.101",
               "productId": "Microsoft.VisualStudio.Product.Community",
               "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.exe",
               "state": 4294967295,
               "isComplete": true,
               "isLaunchable": true,
               "isPrerelease": false,
               "isRebootRequired": false,
               "displayName": "Visual Studio Community 2019",
               "description": "Powerful IDE, free for students, open-source contributors, and individuals",
               "channelId": "VisualStudio.16.Release",
               "channelUri": "https://aka.ms/vs/16/release/channel",
               "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
               "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.8.4",
               "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
               "updateDate": "2021-01-28T11:54:16.6785795Z",
               "catalog": {
                 "buildBranch": "d16.8",
                 "buildVersion": "16.8.30907.101",
                 "id": "VisualStudio/16.8.4+30907.101",
                 "localBuild": "build-lab",
                 "manifestName": "VisualStudio",
                 "manifestType": "installer",
                 "productDisplayVersion": "16.8.4",
                 "productLine": "Dev16",
                 "productLineVersion": "2019",
                 "productMilestone": "RTW",
                 "productMilestoneIsPreRelease": "False",
                 "productName": "Visual Studio",
                 "productPatchVersion": "4",
                 "productPreReleaseMilestoneSuffix": "1.0",
                 "productSemanticVersion": "16.8.4+30907.101",
                 "requiredEngineVersion": "2.8.3267.30329"
               },
               "properties": {
                 "campaignId": "",
                 "channelManifestId": "VisualStudio.16.Release/16.8.4+30907.101",
                 "nickname": "",
                 "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
               }
             }
           ]
[  +19 ms] Building Windows application...
[  +12 ms] <- compile package:flutter_application_3/main.dart
[   +1 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe -S
C:\Users\Gaetan\Developer\Projects\flutter_application_3\windows -B build\windows -G Visual Studio 16 2019
[  +58 ms] -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
[  +34 ms] -- Configuring done
[  +57 ms] -- Generating done
[   +3 ms] -- Build files have been written to: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows
[   +7 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe --build build\windows --config  
Debug --target INSTALL --verbose
[ +118 ms] Microsoft (R) Build Engine version 16.8.3+39993bd9d for .NET Framework
[   +1 ms] Copyright (C) Microsoft Corporation. All rights reserved.
[  +52 ms] Build started 02-Feb-21 20:40:20.
[ +218 ms] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\INSTALL.vcxproj" on node 1 (default targets).
[        ] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\INSTALL.vcxproj" (1) is building
"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
[   +9 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[  +17 ms] CustomBuild:
[   +2 ms]   All outputs are up-to-date.
[  +29 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\ZERO_CHECK.vcxproj" (default targets).
[  +89 ms] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\INSTALL.vcxproj" (1) is building
"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\ALL_BUILD.vcxproj" (3) on node 1 (default targets).
[        ] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\ALL_BUILD.vcxproj" (3) is building
"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\runner\flutter_application_3.vcxproj" (4) on node 1 (default targets).
[        ] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\runner\flutter_application_3.vcxproj" (4) is building
"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\flutter_assemble.vcxproj" (5) on node 1 (default targets).
[   +8 ms] InitializeBuildStatus:
[        ]   Creating "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[        ] CustomBuild:
[        ]   "The build of 'C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\CMakeFiles\4bdb87ddef31ca86da4ef963de7853cb\flutter_assemble.rule' depends on     
'C:\USERS\GAETAN\DEVELOPER\PROJECTS\FLUTTER_APPLICATION_3\WINDOWS\FLUTTER\EPHEMERAL\FLUTTER_WINDOWS.DLL' which is produced by the build of
'C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\CMakeFiles\3339c7d724da7bbac3964e1067c73a09\flutter_windows.dll.rule'. The items cannot be built in
parallel."
[  +65 ms]   Generating C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/flutter_windows.dll,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/flutter_export.h,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/flutter_windows.h,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/flutter_messenger.h,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/flutter_plugin_registrar.h,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/flutter_texture_registrar.h,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/cpp_client_wrapper/core_implementations.cc,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/cpp_client_wrapper/standard_codec.cc,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/cpp_client_wrapper/plugin_registrar.cc,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/cpp_client_wrapper/flutter_engine.cc,
C:/Users/Gaetan/Developer/Projects/flutter_application_3/windows/flutter/ephemeral/cpp_client_wrapper/flutter_view_controller.cc, _phony_
[ +928 ms]   [  +56 ms] executing: [C:\Users\Gaetan\Developer\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +52 ms]   [  +69 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ]   [        ] c40e5294dda34d04cd222dfdf765f171e12e4a8d
[        ]   [        ] executing: [C:\Users\Gaetan\Developer\src\flutter/] git tag --points-at c40e5294dda34d04cd222dfdf765f171e12e4a8d
[  +50 ms]   [  +50 ms] Exit code 0 from: git tag --points-at c40e5294dda34d04cd222dfdf765f171e12e4a8d
[        ]   [        ] 1.26.0-17.1.pre
[  +30 ms]   [  +31 ms] executing: [C:\Users\Gaetan\Developer\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +44 ms]   [  +43 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms]   [        ] origin/dev
[        ]   [        ] executing: [C:\Users\Gaetan\Developer\src\flutter/] git ls-remote --get-url origin
[  +36 ms]   [  +38 ms] Exit code 0 from: git ls-remote --get-url origin
[        ]   [        ] https://github.com/flutter/flutter.git
[  +69 ms]   [  +69 ms] executing: [C:\Users\Gaetan\Developer\src\flutter/] git rev-parse --abbrev-ref HEAD
[  +41 ms]   [  +41 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ]   [        ] dev
[  +68 ms]   [  +68 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms]   [   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +8 ms]   [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +36 ms]   [  +46 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[   +2 ms]   [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +8 ms]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ]   [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +44 ms]   [  +60 ms] Initializing file store
[  +17 ms]   [  +17 ms] Skipping target: gen_localizations
[   +5 ms]   [   +5 ms] unpack_windows: Starting due to {}
[ +179 ms]   [ +178 ms] kernel_snapshot: Starting due to {}
[   +2 ms]   [   +2 ms] unpack_windows: Complete
[+2284 ms]   [+2283 ms] C:\Users\Gaetan\Developer\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Users\Gaetan\Developer\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Users\Gaetan\Developer\src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies
-DFLUTTER_WEB_AUTO_DETECT\Users\Gaetan\Developer\Projects\flutter_application_3\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts
--packages C:\Users\Gaetan\Developer\Projects\flutter_application_3\.dart_tool\package_config.json --output-dill
C:\Users\Gaetan\Developer\Projects\flutter_application_3\.dart_tool\flutter_build\ba02bbffb1729791b34b1162fd8c0579\app.dill --depfile
C:\Users\Gaetan\Developer\Projects\flutter_application_3\.dart_tool\flutter_build\ba02bbffb1729791b34b1162fd8c0579\kernel_snapshot.d package:flutter_application_3/main.dart   
[+5478 ms]   [+5479 ms] kernel_snapshot: Complete
[ +357 ms]   [ +357 ms] debug_bundle_windows_assets: Starting due to {}
[  +89 ms]   [  +89 ms] debug_bundle_windows_assets: Complete
[ +346 ms]   [ +346 ms] Persisting file store
[   +7 ms]   [   +7 ms] Done persisting file store
[   +5 ms]   [   +5 ms] build succeeded.
[   +6 ms]   [   +6 ms] "flutter assemble" took 8,921ms.
[  +62 ms]   [  +62 ms] ensureAnalyticsSent: 59ms
[   +1 ms]   [   +1 ms] Running shutdown hooks 
[        ]   [        ] Shutdown hooks complete
[        ]   [        ] exiting with code 0    
[  +71 ms] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\flutter_assemble\flutter_assemble.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\flutter_assemble\flutter_assemble.tlog\flutter_assemble.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\flutter_assemble.vcxproj" (default targets).
[  +27 ms] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\runner\flutter_application_3.vcxproj" (4) is building
"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\flutter_wrapper_app.vcxproj" (6) on node 1 (default targets).   
[        ] InitializeBuildStatus:
[        ]   Creating "flutter_wrapper_app.dir\Debug\flutter_.5A207A0A.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +32 ms] ClCompile:
[        ]   All outputs are up-to-date.
[  +16 ms] Lib:
[        ]   All outputs are up-to-date.
[        ]   flutter_wrapper_app.vcxproj -> C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\Debug\flutter_wrapper_app.lib
[  +18 ms] FinalizeBuildStatus:
[        ]   Deleting file "flutter_wrapper_app.dir\Debug\flutter_.5A207A0A.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_app.dir\Debug\flutter_.5A207A0A.tlog\flutter_wrapper_app.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\flutter_wrapper_app.vcxproj" (default targets).
[   +5 ms] InitializeBuildStatus:
[        ]   Touching "flutter_application_3.dir\Debug\flutter_.24C1CE9C.tlog\unsuccessfulbuild".
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[  +22 ms] ClCompile:
[        ]   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\CL.exe /c
/IC:\Users\Gaetan\Developer\Projects\flutter_application_3\windows /IC:\Users\Gaetan\Developer\Projects\flutter_application_3\windows\flutter\ephemeral
/IC:\Users\Gaetan\Developer\Projects\flutter_application_3\windows\flutter\ephemeral\cpp_client_wrapper\include /Zi /nologo /W4 /WX /diagnostics:column /Od /Ob0 /D WIN32 /D _WINDOWS/D _HAS_EXCEPTIONS=0 /D _DEBUG /D NOMINMAX /D UNICODE /D _UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope  
/Zc:inline /GR /std:c++17 /Fo"flutter_application_3.dir\Debug\\" /Fd"flutter_application_3.dir\Debug\vc142.pdb" /Gd /TP /wd4100 /errorReport:queue
C:\Users\Gaetan\Developer\Projects\flutter_application_3\windows\flutter\generated_plugin_registrant.cc
C:\Users\Gaetan\Developer\Projects\flutter_application_3\windows\runner\flutter_window.cpp
[  +74 ms]   generated_plugin_registrant.cc
[ +359 ms]   flutter_window.cpp
[ +598 ms]   Generating Code...
[  +67 ms] ResourceCompile:
[        ]   All outputs are up-to-date.
[  +22 ms] Link:
[  +13 ms]   C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE
/OUT:"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\runner\Debug\flutter_application_3.exe" /INCREMENTAL /NOLOGO ..\flutter\Debug\flutter_wrapper_app.lib   
C:\Users\Gaetan\Developer\Projects\flutter_application_3\windows\flutter\ephemeral\flutter_windows.dll.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib      
oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed
/manifestinput:C:\Users\Gaetan\Developer\Projects\flutter_application_3\windows\runner\runner.exe.manifest /DEBUG
/PDB:"C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/flutter_application_3.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/flutter_application_3.lib" /MACHINE:X64  /machine:x64
flutter_application_3.dir\Debug\Runner.res
[   +1 ms]   flutter_application_3.dir\Debug\flutter_window.obj
[        ]   flutter_application_3.dir\Debug\main.obj
[        ]   flutter_application_3.dir\Debug\run_loop.obj
[        ]   flutter_application_3.dir\Debug\utils.obj
[        ]   flutter_application_3.dir\Debug\win32_window.obj
[        ]   flutter_application_3.dir\Debug\generated_plugin_registrant.obj
[ +151 ms]   flutter_application_3.vcxproj -> C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\runner\Debug\flutter_application_3.exe
[   +5 ms] FinalizeBuildStatus:
[  +10 ms]   Deleting file "flutter_application_3.dir\Debug\flutter_.24C1CE9C.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_application_3.dir\Debug\flutter_.24C1CE9C.tlog\flutter_application_3.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\runner\flutter_application_3.vcxproj" (default targets).
[  +18 ms] Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\ALL_BUILD.vcxproj" (3) is building
"C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\flutter_wrapper_plugin.vcxproj" (7) on node 1 (default targets).
[  +21 ms] InitializeBuildStatus:
[  +25 ms]   Creating "flutter_wrapper_plugin.dir\Debug\flutter_.48B2457A.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[   +1 ms] CustomBuild:
[        ]   All outputs are up-to-date.
[        ] ClCompile:
[        ]   All outputs are up-to-date.
[        ] Lib:
[        ]   All outputs are up-to-date.
[  +14 ms]   flutter_wrapper_plugin.vcxproj -> C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\Debug\flutter_wrapper_plugin.lib
[  +13 ms] FinalizeBuildStatus:
[  +14 ms]   Deleting file "flutter_wrapper_plugin.dir\Debug\flutter_.48B2457A.tlog\unsuccessfulbuild".
[        ]   Touching "flutter_wrapper_plugin.dir\Debug\flutter_.48B2457A.tlog\flutter_wrapper_plugin.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\flutter\flutter_wrapper_plugin.vcxproj" (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[        ] CustomBuild:
[        ]   All outputs are up-to-date.
[        ] FinalizeBuildStatus:
[        ]   Deleting file "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\unsuccessfulbuild".
[        ]   Touching "x64\Debug\ALL_BUILD\ALL_BUILD.tlog\ALL_BUILD.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\ALL_BUILD.vcxproj" (default targets).
[        ] InitializeBuildStatus:
[        ]   Creating "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
[  +17 ms] PostBuildEvent:
[  +12 ms]   setlocal
[        ]   "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -DBUILD_TYPE=Debug -P
cmake_install.cmake
[  +14 ms]   if %errorlevel% neq 0 goto :cmEnd
[        ]   :cmEnd
[        ]   endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
[  +14 ms]   :cmErrorLevel
[        ]   exit /b %1
[        ]   :cmDone
[        ]   if %errorlevel% neq 0 goto :VCEnd
[        ]   :VCEnd
[  +22 ms]   -- Install configuration: "Debug"
[   +9 ms]   -- Up-to-date: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/icudtl.dat
[        ]   -- Up-to-date: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/flutter_windows.dll
[   +5 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets
[   +1 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/AssetManifest.json
[  +25 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/FontManifest.json
[  +13 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/fonts
[        ]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/fonts/MaterialIcons-Regular.otf
[        ]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/kernel_blob.bin
[  +54 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/NOTICES
[   +2 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/packages
[  +13 ms]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons
[        ]   -- Installing: C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets
[        ]   -- Installing:
C:/Users/Gaetan/Developer/Projects/flutter_application_3/build/windows/runner/Debug/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[  +39 ms] FinalizeBuildStatus:
[  +12 ms]   Deleting file "x64\Debug\INSTALL\INSTALL.tlog\unsuccessfulbuild".
[  +13 ms]   Touching "x64\Debug\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
[        ] Done Building Project "C:\Users\Gaetan\Developer\Projects\flutter_application_3\build\windows\INSTALL.vcxproj" (default targets).
[        ] Build succeeded.
[        ]     0 Warning(s)
[        ]     0 Error(s)
[        ] Time Elapsed 00:00:12.57
[   +1 ms] Building Windows application... (completed in 13.0s)
[ +276 ms] Observatory URL on device: http://127.0.0.1:65185/51MDfpXVrZk=/
[   +2 ms] Caching compiled dill
[  +34 ms] Connecting to service protocol: http://127.0.0.1:65185/51MDfpXVrZk=/
[  +85 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:65185/51MDfpXVrZk=/.
[  +49 ms] DDS is listening at http://127.0.0.1:65190/dtkeDCCgPxU=/.
[  +40 ms] Successfully connected to service protocol: http://127.0.0.1:65185/51MDfpXVrZk=/
[  +15 ms] Activating Dart DevTools...
[+5653 ms] flutter: 0x31
[  +87 ms] flutter: 0x10700000031

Activity

  1. TahaTesser commented on Feb 3, 2021

    @TahaTesser
    Contributor

    Hi @gaetschwartz
    Thanks for filing the issue, you're correct, the actual code is different compared to mac or web but it seems to change fast from 0x31 to 0x10700000031 when pressing 1 on the keyboard on windows. (this might be a regression, not sure)

    code sample
    /// Flutter code sample for LogicalKeyboardKey
    import 'package:flutter/foundation.dart';
    import 'package:flutter/material.dart';
    import 'package:flutter/scheduler.dart';
    import 'package:flutter/services.dart';
    
    void main() {
      runApp(MyApp());
    }
    
    /// This is the main application widget.
    class MyApp extends StatelessWidget {
      static const String _title = 'Flutter Code Sample';
    
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: _title,
          home: Scaffold(
            appBar: AppBar(title: const Text(_title)),
            body: MyStatefulWidget(),
          ),
        );
      }
    }
    
    /// This is the stateful widget that the main application instantiates.
    class MyStatefulWidget extends StatefulWidget {
      MyStatefulWidget({Key key}) : super(key: key);
    
      @override
      _MyStatefulWidgetState createState() => _MyStatefulWidgetState();
    }
    
    /// This is the private State class that goes with MyStatefulWidget.
    class _MyStatefulWidgetState extends State<MyStatefulWidget> {
      // The node used to request the keyboard focus.
      final FocusNode _focusNode = FocusNode();
    // The message to display.
      String _message;
    
    // Focus nodes need to be disposed.
      @override
      void dispose() {
        _focusNode.dispose();
        super.dispose();
      }
    
    // Handles the key events from the RawKeyboardListener and update the
    // _message.
      void _handleKeyEvent(RawKeyEvent event) {
        setState(() {
          _message = (event.isControlPressed ? 'CTRL + ' : '') +
              "0x" +
              event.logicalKey.keyId.toRadixString(16) +
              '\n' +
              event.logicalKey.toString();
        });
        print("0x" + event.logicalKey.keyId.toRadixString(16));
      }
    
      @override
      Widget build(BuildContext context) {
        final TextTheme textTheme = Theme.of(context).textTheme;
        return Container(
          color: Colors.white,
          alignment: Alignment.center,
          child: DefaultTextStyle(
            style: textTheme.headline4,
            child: RawKeyboardListener(
              focusNode: _focusNode,
              onKey: _handleKeyEvent,
              child: AnimatedBuilder(
                animation: _focusNode,
                builder: (BuildContext context, Widget child) {
                  if (!_focusNode.hasFocus) {
                    return GestureDetector(
                      onTap: () {
                        FocusScope.of(context).requestFocus(_focusNode);
                      },
                      child: const Text('Tap to focus'),
                    );
                  }
                  return Text(_message ?? 'Press a key');
                },
              ),
            ),
          ),
        );
      }
    }
    

    Windows Preview

    ezgif com-gif-maker

    flutter doctor -v
    [√] Flutter (Channel master, 1.26.0-18.0.pre.156, on Microsoft Windows [Version 10.0.19042.746], locale en-US)
        • Flutter version 1.26.0-18.0.pre.156 at C:\Users\Taha\Code\flutter_master
        • Framework revision 45508985b1 (6 hours ago), 2021-02-02 22:46:04 -0500
        • Engine revision 2c144c3eeb
        • Dart version 2.12.0 (build 2.12.0-282.0.dev)
    [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at C:\Users\Taha\Code\SDK
        • Platform android-30, build-tools 30.0.3
        • ANDROID_HOME = C:\Users\Taha\Code\SDK
        • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
        • All Android licenses accepted.
    [√] Chrome - develop for the web
        • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
    [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
        • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
        • Visual Studio Community 2019 version 16.8.30804.86
        • Windows 10 SDK version 10.0.18362.0
    [√] Android Studio (version 4.1.0)
        • Android Studio at C:\Users\Taha\Code\android-studio
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    [√] VS Code (version 1.52.1)
        • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
        • Flutter extension version 3.19.0
    [√] Connected device (3 available)
        • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19042.746]
        • Chrome (web)      • chrome  • web-javascript • Google Chrome 88.0.4324.104
        • Edge (web)        • edge    • web-javascript • Microsoft Edge 88.0.705.53
    • No issues found!

    Mac Preview

    Screenshot 2021-02-03 at 2 50 48 PM

    flutter doctor -v
    [✓] Flutter (Channel master, 1.26.0-18.0.pre.156, on macOS 11.1 20C69 darwin-x64, locale en-GB)
        • Flutter version 1.26.0-18.0.pre.156 at /Users/tahatesser/Code/flutter_master
        • Framework revision 45508985b1 (3 hours ago), 2021-02-02 22:46:04 -0500
        • Engine revision 2c144c3eeb
        • Dart version 2.12.0 (build 2.12.0-282.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Volumes/Extreme/SDK
        • Platform android-30, build-tools 30.0.3
        • ANDROID_HOME = /Volumes/Extreme/SDK
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS
        • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
        • Xcode 12.4, Build version 12D4e
        • CocoaPods version 1.10.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          :hammer: https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          :hammer: https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.52.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.19.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-x64     • macOS 11.1 20C69 darwin-x64
        • Chrome (web)    • chrome • web-javascript • Google Chrome 88.0.4324.96
    
    • No issues found!

    Thank you

  2. added
    engineflutter/engine related. See also e: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    platform-windowsBuilding on or for Windows specifically
    on Feb 3, 2021
  3. dkwingsmt commented on Feb 3, 2021

    @dkwingsmt
    Contributor

    This will probably be solved with the ongoing #44918

  4. gaetschwartz commented on Feb 3, 2021

    @gaetschwartz
    Author

    @TahaTesser Indeed, because the right keyId is output when the key is pressed but a different one is once the key is released.

  5. added
    P2Important issues not at the top of the work list
    on Feb 5, 2021
  6. dkwingsmt commented on May 20, 2022

    @dkwingsmt
    Contributor

    As of latest (43c81ff) this problem is no longer reproducible.

  7. github-actions commented on Jun 3, 2022

    @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.

  8. locked as resolved and limited conversation to collaborators on Jun 3, 2022
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

    P2Important issues not at the top of the work lista: desktopRunning on desktopengineflutter/engine related. See also e: labels.found in release: 1.26Found to occur in 1.26has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions