嵌入式 pdf 阅读器无法识别键盘输入

Sea*_*mus 6 10.10 pdf evince okular

自从升级到 10.10 以来,evince、okular 或 xpdf 在作为嵌入在 Firefox 中的 pdf 阅读器工作时都无法识别向上/向下、向上/向下翻页键。

我在 okular 之前(10.04)遇到过这个问题,这是我将它切换回 evince 的部分原因(我也不喜欢 okular 中的 KDE 保存文件)。但是现在我在 evince 中也有同样的问题,即使在切换回 evince 之后。[为什么 ubuntu 坚持将 okular 设为默认设置,即使是在 gnome 上?]

所以:

如何使我的 PgUp/PgDn 键与嵌入式 pdf 阅读器一起使用?

fra*_*ous 5

您是否正在使用mozplugger将 PDF 阅读器嵌入到 Firefox 中?在这种情况下,您可以通过在 中创建本地 mozpluggerrc 来更改嵌入的 PDF 程序~/.mozilla/,例如:

cp /etc/mozplugger ~/.mozilla/

(你的“基础” mozplugger 可能不在那里。这就是我在 Arch 上的位置。)

然后编辑与 PDF 相关的部分,使其仅包含您想要的内容。

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
       repeat noisy swallow(okular) fill: okular "$file"
       repeat noisy swallow(evince) fill: evince "$file"
       repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
       repeat swallow(acroread) fill: acroread7 -openInNewWindow "$file"
       GV()
Run Code Online (Sandbox Code Playgroud)

删除与您不想要的 PDF 查看器有关的行。(不是 Ubuntu 将其默认为 Okular,而是 mozplugger 开发人员。)

尝试 evince、okular、mupdf、epdfviewer,看看它们是否有效。

我无法复制它,所以我真的不知道如何用钥匙解决问题,但我只想说,你不是唯一一个有问题的人。一些错误报告阅读:

http://bugreports.qt.nokia.com/browse/QTBUG-3814

https://www.mozdev.org/bugs/show_bug.cgi?id=22359

https://bugzilla.mozilla.org/show_bug.cgi?id=560501

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519832

编辑:在多看了几遍之后,我在 Ubuntu 联机帮助页上发现了以下关于 mozplugger 的注释

   needs_xembed
          Some applications when embedded requires  the  Xembed  protocol,
          other applications don’t want the Xembed protocol. Add or remove
          this flag if you find that you cannot move keyboard focus to the
          embedded  window.  Currently  it  appears QT4 based applications
          require this flag.
Run Code Online (Sandbox Code Playgroud)

所以尝试,在 mozplugger 中更改线路:

 repeat noisy swallow(evince) fill: evince "$file"
Run Code Online (Sandbox Code Playgroud)

 repeat noisy needs_xembed swallow(evince) fill: evince "$file"
Run Code Online (Sandbox Code Playgroud)

  • 实际上,这与正确的解决方案正好相反!诀窍是从那行_remove_ `needs_xembed` 标签! (2认同)