Skip to content

Support passing keypresses up to IDEs to enable shortcut keys when embedded DevTools has focus#2872

Merged
DanTup merged 1 commit intoflutter:masterfrom
DanTup:vscode-keypresses
Apr 20, 2021
Merged

Support passing keypresses up to IDEs to enable shortcut keys when embedded DevTools has focus#2872
DanTup merged 1 commit intoflutter:masterfrom
DanTup:vscode-keypresses

Conversation

@DanTup
Copy link
Contributor

@DanTup DanTup commented Apr 7, 2021

The origin for the VS Code web-view appears to include a random hash, so we have to pass * for postMessage, so this also checks that DevTools is connected to a VM Service and also that the user agent contains Electron. @jacob314 let me know if you think this is not sufficient (we could perhaps ping the server and see if it was started in embedded mode too).

@helin24 if you're embedding inside an iframe (probably not, though in VS Code it's required) in IntelliJ and also need to handle keypresses, we may need to add an additional user agent check.

Fixes #2775 (with an equiv change in VS Code).

…bedded DevTools has focus

Fixes flutter#2775 (with an equiv change in VS Code).
Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

lgtm

@DanTup DanTup merged commit 81357f8 into flutter:master Apr 20, 2021
@DanTup DanTup deleted the vscode-keypresses branch April 20, 2021 06:12
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 this pull request may close these issues.

There is no way to exit widget inspector by keyboard in vscode

2 participants