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

Keyboard shortcuts for toolbar buttons #4

Closed
renkun-ken opened this issue May 29, 2020 · 5 comments
Closed

Keyboard shortcuts for toolbar buttons #4

renkun-ken opened this issue May 29, 2020 · 5 comments

Comments

@renkun-ken
Copy link
Contributor

The toolbar works nicely in web browser. I'm wondering if it is possible to add some keyboard shortcuts to those toolbar buttons, e.g.

left, right, +, -, ctrl+s, del

@nx10
Copy link
Owner

nx10 commented May 29, 2020

Great suggestion! I have implemented the keyboard shortcuts for the life server.

@renkun-ken
Copy link
Contributor Author

In the webbrowser, the keyboard shortcuts work nicely. However, none works in VSCode WebView. I guess it is caused by the webpage being embedded inside a iframe in the webview. I'll do more search and experiment and see if there's anything we can do.

@renkun-ken
Copy link
Contributor Author

Related: microsoft/vscode#65452

Looks like we should do some rebroadcasting of the key events to the iframe as suggested at microsoft/vscode#65452 (comment).

@nx10
Copy link
Owner

nx10 commented May 29, 2020

I just switched from the <object> to a <img> tag for displaying the SVG. This fixes some issues with user input for me. Does this show any difference in the vscode webview?

@renkun-ken
Copy link
Contributor Author

With the latest commit, the keyboard shortcuts work nicely in VSCode WebView now. Thanks!

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

No branches or pull requests

2 participants