Vimium: j/k keybindigs not working on PDF viewer

Created on 14 Nov 2012  路  16Comments  路  Source: philc/vimium

When viewing a PDF, scrolling keybindings do not work.

This has been reported once (https://github.com/philc/vimium/issues/350) but i created this new report as the other issue was closed while the problem still persisted.

Most helpful comment

You may be interested in Mozilla's PDF.js, specifically the Chrome (and Opera) extension. The extension renders PDFs as HTML5 and JS, which vimium can play nicely with, so you can have all the usual Vimium functionality for PDF documents too.

All 16 comments

It doesn't work indeed. Some other shortcuts do work, like o, b, ? , but those that are actually crucial like j/k/l/h/, search etc do not work.

This is pretty much unfixable, because Javascript doesn't run in the PDF viewer. Thanks for the report though.

dammit, this is very annoying, that's the problem with closed source software (libpdf.so)

You may be interested in Mozilla's PDF.js, specifically the Chrome (and Opera) extension. The extension renders PDFs as HTML5 and JS, which vimium can play nicely with, so you can have all the usual Vimium functionality for PDF documents too.

@mrmr1993 does it? I tried that a little earlier, (been digging into this a bit) I couldn't get vimium's j/k keys to work or the O to open things, did I do something wrong? P.S. I tried using the linked to extension have you gotten things working in this way? P.P.S. with the extension i installed I lose the ability to swap tabs with J and K as well

@mhauserr How strange, I thought it used to work.. The current version of PDF.js seems to be doing something funky and stopping all other extensions' content scripts from loading. I will investigate further.

I ran into the same issue and gave the PDF.js extension a try. It looks promising and jk scroll works. However, only page-wise but not real scrolling entirely through a page.

Doese anyone know if this behaviour can be changed?

I looked into this for a bit. Couldn't think of an easy way of doing this as extensions can't interact with one another on chrome. see here for details. (oh and you get the scrolling at the expense of the back/forward and left/right a tab functionality, so I switched back to chrome's inbuilt version). I think I also asked the chromium guys here in their bug tracker. doesn't look like they're going to expose any API's we can interact with or anything.

@mrmr1993 et. all: Found an alternative extension allowing jk pdf scrolling with vimium. Called Open with Drive Viewer . It requires a right click but perhaps someone know a vimium binding for that?

I have a workaround for this. Check https://github.com/DiogoFerrari/vi-keybinding. Any contribution is welcome.

I have also developed a solution for this with a chrome extension that communicates with vimium++ perfectly, message me if you have any other feature requests or bug reports

@KVohra95 Do you have a pdf plugin that works with the regular Vimium?

@kabeersvohra It doesn't work for me

@john1625b sorry, this relies on the capabilities of Vimium++

@damaru2 have you got Vimium++ and have you made sure to add the extension id to the whitelist as in the readme of the extension?

@kabeersvohra Ok, it works now, my bad. By default you have in vimium three ids and in a comment it says #聽modified聽{聽Vomnibar聽Page,聽X聽New聽Tab,聽PDF聽Viewer聽} so I had assumed the third id was the one of your pdf viewer. Thanks.

Was this page helpful?
0 / 5 - 0 ratings