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

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

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

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

所以:

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

答案1

您是否使用mozplugger在 Firefox 中嵌入 PDF 阅读器?在这种情况下,您可以通过在 中创建本地 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()

删除与您不需要的 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

编辑:经过一番探索,我发现了以下注释关于 mozplugger 的 Ubuntu 手册页

   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.

因此,请尝试更改 mozplugger 中的以下行:

 repeat noisy swallow(evince) fill: evince "$file"

 repeat noisy needs_xembed swallow(evince) fill: evince "$file"

答案2

我也遇到了同样的问题。我激活了选项,新窗口在后台打开,不会自动获得焦点。当我更改此设置(设置管理器 --> 窗口管理器或在 Compiz 管理器中)时,它起作用了。

布里奇

相关内容