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

[Key mapping issue]Exception was thrown by flutter framework when press 'Menu' key on TV device #229

Closed
xiaowei-guan opened this issue Jan 4, 2022 · 4 comments

Comments

@xiaowei-guan
Copy link

══╡ 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#80af0(logicalKey: LogicalKeyboardKey#00106(keyId: "0x200000106", keyLabel: "Meta
Left", debugName: "Meta Left"), physicalKey: PhysicalKeyboardKey#700e3(usbHidUsage: "0x000700e3",
debugName: "Meta Left")) and its data: RawKeyEventDataLinux#ef142(toolkit: GTK, unicodeScalarValues:
0, scanCode: 133, keyCode: 65511, modifiers: 0, isDown: true)
'package:flutter/src/services/raw_keyboard.dart':
Failed assertion: line 694 pos 7: 'event is! RawKeyDownEvent || _keysPressed.isNotEmpty'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2 RawKeyboard.handleRawKeyEvent (package:flutter/src/services/raw_keyboard.dart:694:7)
#3 KeyEventManager.handleRawKeyMessage (package:flutter/src/services/hardware_keyboard.dart:818:33)
#4 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:77:49)
#5 BasicMessageChannel.setMessageHandler. (package:flutter/src/services/platform_channel.dart:76:47)
#6 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:389:35)
#7 _DefaultBinaryMessenger.setMessageHandler. (package:flutter/src/services/binding.dart:386:46)
#8 _invoke2. (dart:ui/hooks.dart:189:15)
#12 _invoke2 (dart:ui/hooks.dart:188:10)
#13 _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42:5)
#14 _Channel.push (dart:ui/channel_buffers.dart:132:31)
#15 ChannelBuffers.push (dart:ui/channel_buffers.dart:329:17)
#16 PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:544:22)
#17 _dispatchPlatformMessage (dart:ui/hooks.dart:83:31)
(elided 5 frames from class _AssertionError and dart:async)
════════════════════════════════════════════════════════════════════════════════════════════════════

@xiaowei-guan
Copy link
Author

'Menu' keycode is 0X85 on TV device.
{0x00000085, 65511}, // LogicalKeyboardKey.metaLeft

@swift-kim
Copy link
Member

Do you want to capture the menu button in your app or can you simply ignore it? In the latter case we can just remove the mapping from key_event_channel.cc.

@xiaowei-guan
Copy link
Author

Do you want to capture the menu button in your app or can you simply ignore it? In the latter case we can just remove the mapping from key_event_channel.cc.

I think we can ignore this issue for now, because it doesn't affect app development.

@swift-kim
Copy link
Member

Related to flutter-tizen/flutter-tizen#319.

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 a pull request may close this issue.

2 participants