V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
laxapple
V2EX  ›  macOS

macOS Sierra 10.12 下 Chrome 如何检测焦点是否在文本框?

  •  
  •   laxapple · Oct 11, 2016 · 1454 views
    This topic created in 3498 days ago, the information mentioned may be changed or developed.

    开始我用 cVim 扩展实现 J 、 K 切换标签,但有两个问题:

    • cVim 无法操作 chrome:// 页面
    • 有些网页加载比较慢, cVim 要等一段时间才能操作

    我希望在非编辑模式下将 J 、 K 分别映射到 ⌘+⇧+ [ 和 ⌘+⇧+ ] , Karabiner 之前的版本有这个功能,现在用不了。 现在暂时用 Keyboard Maestro 执行 document.activeElement.nodeName 来判断,但还是有一定延迟。

    利用 KM 、 AppleScript 或者 Python ,有没有其它高效地实现办法?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3067 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:57 · PVG 20:57 · LAX 05:57 · JFK 08:57
    ♥ Do have faith in what you're doing.