Latex-workshop: Allow for the pdf viewer to accept some important vscode shortcuts

Created on 25 May 2019  路  11Comments  路  Source: James-Yu/LaTeX-Workshop

Is your feature request related to a problem? Please describe.

Once the pdf viewer gets focus there is too little that can be done with keys except for moving around and closing it. But, since it can be very annoying to keep the split all the time, and also to close the viewer and reopen it, retrim it, rezoom it, etc, it would be very useful to move it from and to editor groups quickly. Moreover, there is no way to drag it into its own group because it won't show the "drop zones" like standard editors do.

Describe the solution you'd like

Allow for most of vscode keys to pass through, if possible. At least Ctrl-Alt chords and Ctrl-K sequences.

Describe alternatives you've considered

Dragging and dropping with the mouse, but it's broken as described above (this happens with other previewers too, it seems more of a limitation in vscode itself).

feature-request

Most helpful comment

I have already investigated how to use VSCode's shortcuts inside the PDF Viewer but with no success. Community help is needed here. Maybe we should post on the pdf.js repo.

All 11 comments

CMD+Q on MacOS don`t closes VSCode when the Preview Tab is on fokus.
I think this could be addressed with this Issue too

I have already investigated how to use VSCode's shortcuts inside the PDF Viewer but with no success. Community help is needed here. Maybe we should post on the pdf.js repo.

We can define keyboard shortcuts in viewer/latexworkshop.js if we need. By passing a message to the LaTeX Workshop process from WebView through WebSocket, we can implement a keyboard shortcut of VSCode inside the WebView.

The focus of WebView is also discussed on microsoft/vscode/issues/65413. Although fixing 65413 does not necessarily solve our problem, I want to wait for 65413 to be fixed, which is planed to done in June as the milestone tag says.

I've been inspecting the code of pdf.js. I doesn't seem to be using Ctrl-K so I'm reporting an issue to their tracker https://github.com/mozilla/pdf.js/issues/10861. Could you fill some details in there? (about pdf.js version, webview version, etc)

No. I wait as I said.

I don't understand your comment. The report is for the pdf.js people to check why it's interfering with Ctrl-K. Obviously they need some details that I'm not sure about since they're the versions shipped with LaTeX Workshop, so I asked you for the numbers.

No.

No what? I'm saying I don't understand your comment. How is "no" an answer to that?

@tamuratak any update on this?

no.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

s-ilic picture s-ilic  路  3Comments

tenhobi picture tenhobi  路  4Comments

TiemenSch picture TiemenSch  路  6Comments

dslemusp picture dslemusp  路  4Comments

LordScree picture LordScree  路  5Comments