Comments (12)
@Senne021 Thanks for the report.
We're using Flutter for a webos application
Does it mean for LG Smart TV ? and you using the LG smart remote to navigate flutter app on it ? What's the specific keys are you pressing ?
We're getting the
usbHidUsage
:0x01700000000
and theLogicalKeyboardKey
unidentified
Can you provide us the entire log ?
from flutter.
@darshankawar Thank you for your reply.
Does it mean for LG Smart TV ? and you using the LG smart remote to navigate flutter app on it ? What's the specific keys are you pressing ?
Yes, we're using our app on LG Smart TVs. The missing key code occurs on both the real device and the simulator. Only the media and back buttons are affected by this issue.
Can you provide us the entire log ?
Here is the entire log of different key events:
Play and stop on the LG remote:
KeyUpEvent(
physicalKey:
PhysicalKeyboardKey(
usbHidUsage: "0x1700000000",
debugName: null
),
logicalKey:
LogicalKeyboardKey(
keyId: "0x100000001",
keyLabel: "Unidentified",
debugName: null
),
character: null,
timeStamp: 0:01:03.819099
)
And the key event of one of the arrow keys that work on an LG remote control:
KeyDownEvent(
physicalKey: PhysicalKeyboardKey(
usbHidUsage: "0x00070051",
debugName: "Arrow Down"
), logicalKey:
LogicalKeyboardKey(
keyId: "0x100000301",
keyLabel: "Arrow Down",
debugName: "Arrow Down"
),
character: null,
timeStamp: 0:00:14.981599
)
from flutter.
Thanks for the update. Due to lack of said emulator / device, we can't currently verify this. Keeping the issue open for team's input / attention / tracking.
from flutter.
CC @gspencergoog I believe you wrote the feature mentioned in the description here.
from flutter.
Yes, but the RawKeyEvent
implementation has been deprecated. The replacement KeyEvent
implementation doesn't support access to the platform specific keycodes anymore, so that the entire key event system is more platform agnostic. Ideally, the fix for this is to create an appropriate mapping for the missing keys so that they are identifiable in the same way as other keys are, and the application doesn't need to check web keycodes at all.
from flutter.
@gspencergoog Thank you for your reply. How can I add this type of mapping to Flutter? Do you have an example of that?
from flutter.
Sorry, just to be more clear: the mapping isn't something you'd do normally when making an app, it's a base mapping in Flutter itself.
This is controlled by the keycode generator in https://github.com/flutter/flutter/tree/master/dev/tools/gen_keycodes and what would need to happen is an addition to the keycode database that has the correct mappings, whatever those are. You're welcome to try and build a PR for that yourself, otherwise someone on the Flutter team will need to do it.
from flutter.
@gspencergoog Do you think that expanding the mappings is a scalable solution? Would it make sense for us to provide hooks for extending the mappings in separate packages? For example, there could be a package:webos
that adds WebOS-specific functionality.
from flutter.
It can already be done in a scalable way: you can define your own LogicalKeyboardKey
s, and PhysicalKeyboardKey
s in a package if you want. The mappings just generate the "standard" ones that come with Flutter to contribute to the common set for everyone to use.
However, in this case, the mapping seems to for a specific key called LogicalKeyboardKey.unidentified
in the mappings, and I'm not quite sure what that's indicating. Perhaps there is something on the engine side that needs to be added? @dkwingsmt do you know?
from flutter.
I see, and wow, that's a big file! I wonder if we should break it up by platform and lazy-load only the mappings needed by the current platform. But that's a different story.
from flutter.
The mappings are converted into Dart code, so we don't load it or include it with the app or anything, it's strictly there for codegen purposes (and codegen only happens we we update the mapping and the results are checked in). The unused dart symbols are elided at compile time, so size isn't an issue there either.
from flutter.
@gspencergoog Thx for your input.
I've have looked a little bit deeper into the Flutter keycode generator you mentioned and found a problem when adding the webos keycode. The logical and physical keys for web applications are mapped according to the code
and not the keycode
(which doesn't seem to be used at all). When a key is pressed on a webos remote, an event is triggered where only the keyCode is set. The code value is empty and therefore can't be used for mapping.
Do we need web scan codes as some kind of fallback if the code
value can't be found in the mapping?
from flutter.
Related Issues (20)
- FREE PSN GIFT CARD CODES 2024 ✔ Free PSN Codes 2024 😳 PSN Code Giveaway
- FREE Xbox Gift Card Codes [Updated] 50+ New Redeem Code 2024✔How to get Xbox Gift Cards FOR FREE
- ~<ToDaY'S>~Free Xbox Gift Card Codes 2024 🎮 Up to $100 in Free Xbox Codes in UNDER 5 minutes!
- ✔[[FReE!!]]✔Xbox Gift Card Codes 2024 🎮 Up to $100 in Free Xbox Codes in UNDER 5 minutes!
- LaTeSt!!**Free Xbox Gift Card Codes 2024 🎮 Up to $100 in Free Xbox Codes in UNDER 5 minutes!
- Free Xbox Gift Cards Xbox⚡ Free Gift Card Codes 2024 ⚡Free Xbox Gift Card Codes
- [[GeT!]] Bingo Blitz Free Credits 2024 - Freebies Promo Codes Rewards
- (Guides)~!!@!!^~Bingo Blitz Free Credits 2024 - Freebies Promo Codes Rewards
- -
- -
- -
- Gradient subclasses' static lerp methods drop the GradientTransform of both `a` and `b`
- Compatibility Issue with Flutter Apps on LineageOS 21 HOT 1
- -
- - HOT 1
- Flutter Mac App Crashes on Intel CPU Macs When Using Impeller
- - HOT 1
- Add easy way to change app-wide font family for `CupertinoApp`
- [tool_crash] ProcessException: Failed to find "D:\Flutter\flutter\bin\cache\dart-sdk\bin\dartaotruntime.exe" in the search path. Command: D:\Flutter\flutter\bin\cache\dart-sdk\bin\dartaotruntime.exe, OS error code: 0 HOT 1
- [tool_crash] ProcessException: Failed to find "D:\Flutter\flutter\bin\cache\dart-sdk\bin\dartaotruntime.exe" in the search path. Command: D:\Flutter\flutter\bin\cache\dart-sdk\bin\dartaotruntime.exe, OS error code: 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.